Skip to content

Commit

Permalink
No longer depend on embassy-time
Browse files Browse the repository at this point in the history
  • Loading branch information
jessebraham committed Jan 17, 2024
1 parent ebe4149 commit 7ed2e8e
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 94 deletions.
14 changes: 3 additions & 11 deletions esp-hal-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ embassy-executor = { version = "0.5.0", optional = true }
embassy-futures = { version = "0.1.1", optional = true }
embassy-sync = { version = "0.5.0", optional = true }
embassy-time-driver = { version = "0.1.0", optional = true }
embassy-time = { version = "0.3.0", optional = true }

# RISC-V
riscv = { version = "0.10.1", optional = true }
Expand Down Expand Up @@ -142,22 +141,16 @@ async = [
]

# Embassy support
embassy = ["embassy-time", "embassy-time-driver", "procmacros/embassy"]
embassy = ["embassy-time-driver", "procmacros/embassy"]

embassy-executor-interrupt = ["embassy", "embassy-executor"]
embassy-executor-thread = ["embassy", "embassy-executor"]

embassy-integrated-timers = ["embassy-executor?/integrated-timers"]

embassy-time-systick = []
embassy-time-timg0 = []

# Prefer integrated timers, but allow using the generic queue if needed
embassy-integrated-timers = ["embassy-executor?/integrated-timers"]
embassy-generic-queue-8 = ["embassy-time/generic-queue-8"]
embassy-generic-queue-16 = ["embassy-time/generic-queue-16"]
embassy-generic-queue-32 = ["embassy-time/generic-queue-32"]
embassy-generic-queue-64 = ["embassy-time/generic-queue-64"]
embassy-generic-queue-128 = ["embassy-time/generic-queue-128"]

# Architecture-specific features (intended for internal use)
riscv = ["dep:riscv", "critical-section/restore-state-u8"]
xtensa = ["critical-section/restore-state-u32"]
Expand All @@ -184,7 +177,6 @@ defmt = [
"embassy-executor?/defmt",
"embassy-futures?/defmt",
"embassy-sync?/defmt",
# "embassy-time?/defmt",
"embedded-hal-1?/defmt-03",
"embedded-io/defmt-03",
"embedded-io-async?/defmt-03",
Expand Down
15 changes: 4 additions & 11 deletions esp32-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ critical-section = "1.1.2"
crypto-bigint = { version = "0.5.5", default-features = false }
embassy-executor = { version = "0.5.0", features = ["nightly"] }
embassy-sync = "0.5.0"
embassy-time = "0.3.0"
embedded-graphics = "0.8.1"
embedded-hal-1 = { version = "1.0.0", package = "embedded-hal" }
embedded-hal-async = "1.0.0"
Expand All @@ -44,7 +45,6 @@ sha2 = { version = "0.10.8", default-features = false}
smart-leds = "0.3.0"
ssd1306 = "0.8.4"
static_cell = { version = "2.0.0", features = ["nightly"] }
embassy-time = { version = "0.3.0" }

[features]
default = ["rt", "vectored", "xtal-40mhz", "embassy-integrated-timers"]
Expand All @@ -63,17 +63,10 @@ xtal-40mhz = ["esp-hal-common/xtal-40mhz"]

# Embassy support
embassy = ["esp-hal-common/embassy"]
embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time/tick-hz-1_000_000"]
embassy-executor-thread = ["esp-hal-common/embassy-executor-thread"]
embassy-executor-interrupt = ["esp-hal-common/embassy-executor-interrupt"]

# prefer integrated timers, but allow using the generic queue if needed
embassy-integrated-timers = ["esp-hal-common/embassy-integrated-timers"]
embassy-generic-queue-8 = ["esp-hal-common/embassy-generic-queue-8"]
embassy-generic-queue-16 = ["esp-hal-common/embassy-generic-queue-16"]
embassy-generic-queue-32 = ["esp-hal-common/embassy-generic-queue-32"]
embassy-generic-queue-64 = ["esp-hal-common/embassy-generic-queue-64"]
embassy-generic-queue-128 = ["esp-hal-common/embassy-generic-queue-128"]
embassy-integrated-timers = ["esp-hal-common/embassy-integrated-timers"]
embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time/tick-hz-1_000_000"]

# PSRAM support
psram = []
Expand Down Expand Up @@ -142,4 +135,4 @@ required-features = ["embassy", "async"]

[[example]]
name = "embassy_i2s_read"
required-features = ["embassy", "async"]
required-features = ["embassy", "async"]
17 changes: 5 additions & 12 deletions esp32c2-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ crypto-bigint = { version = "0.5.5", default-features = false }
elliptic-curve = { version = "0.13.8", default-features = false, features = ["sec1"] }
embassy-executor = { version = "0.5.0", features = ["nightly"] }
embassy-sync = "0.5.0"
embassy-time = "0.3.0"
embedded-graphics = "0.8.1"
embedded-hal-1 = { version = "1.0.0", package = "embedded-hal" }
embedded-hal-async = "1.0.0"
Expand All @@ -44,7 +45,6 @@ p256 = { version = "0.13.2", default-features = false, features =
sha2 = { version = "0.10.8", default-features = false}
ssd1306 = "0.8.4"
static_cell = { version = "2.0.0", features = ["nightly"] }
embassy-time = { version = "0.3.0" }

[features]
default = ["rt", "vectored", "xtal-40mhz", "embassy-integrated-timers"]
Expand All @@ -64,18 +64,11 @@ xtal-40mhz = ["esp-hal-common/xtal-40mhz"]

# Embassy support
embassy = ["esp-hal-common/embassy"]
embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time/tick-hz-16_000_000"]
embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time/tick-hz-1_000_000"]
embassy-executor-interrupt = ["esp-hal-common/embassy-executor-interrupt"]
embassy-executor-thread = ["esp-hal-common/embassy-executor-thread"]

# prefer integrated timers, but allow using the generic queue if needed
embassy-integrated-timers = ["esp-hal-common/embassy-integrated-timers"]
embassy-generic-queue-8 = ["esp-hal-common/embassy-generic-queue-8"]
embassy-generic-queue-16 = ["esp-hal-common/embassy-generic-queue-16"]
embassy-generic-queue-32 = ["esp-hal-common/embassy-generic-queue-32"]
embassy-generic-queue-64 = ["esp-hal-common/embassy-generic-queue-64"]
embassy-generic-queue-128 = ["esp-hal-common/embassy-generic-queue-128"]
embassy-integrated-timers = ["esp-hal-common/embassy-integrated-timers"]
embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time/tick-hz-16_000_000"]
embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time/tick-hz-1_000_000"]

[profile.release]
debug = true
Expand Down Expand Up @@ -118,4 +111,4 @@ required-features = ["embassy", "async", "embassy-executor-thread"]

[[example]]
name = "direct-vectoring"
required-features = ["direct-vectoring"]
required-features = ["direct-vectoring"]
17 changes: 5 additions & 12 deletions esp32c3-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ critical-section = "1.1.2"
crypto-bigint = { version = "0.5.5", default-features = false }
embassy-executor = { version = "0.5.0", features = ["nightly"] }
embassy-sync = "0.5.0"
embassy-time = "0.3.0"
embedded-can = "0.4.1"
embedded-graphics = "0.8.1"
embedded-hal = { version = "0.2.7", features = ["unproven"] }
Expand All @@ -47,7 +48,6 @@ sha2 = { version = "0.10.8", default-features = false }
smart-leds = "0.3.0"
ssd1306 = "0.8.4"
static_cell = { version = "2.0.0", features = ["nightly"] }
embassy-time = { version = "0.3.0" }


[features]
Expand All @@ -71,18 +71,11 @@ init-rtc-data = ["esp-hal-common/rv-init-rtc-data"]

# Embassy support
embassy = ["esp-hal-common/embassy"]
embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time/tick-hz-16_000_000"]
embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time/tick-hz-1_000_000"]
embassy-executor-interrupt = ["esp-hal-common/embassy-executor-interrupt"]
embassy-executor-thread = ["esp-hal-common/embassy-executor-thread"]

# prefer integrated timers, but allow using the generic queue if needed
embassy-integrated-timers = ["esp-hal-common/embassy-integrated-timers"]
embassy-generic-queue-8 = ["esp-hal-common/embassy-generic-queue-8"]
embassy-generic-queue-16 = ["esp-hal-common/embassy-generic-queue-16"]
embassy-generic-queue-32 = ["esp-hal-common/embassy-generic-queue-32"]
embassy-generic-queue-64 = ["esp-hal-common/embassy-generic-queue-64"]
embassy-generic-queue-128 = ["esp-hal-common/embassy-generic-queue-128"]
embassy-integrated-timers = ["esp-hal-common/embassy-integrated-timers"]
embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time/tick-hz-16_000_000"]
embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time/tick-hz-1_000_000"]

[profile.release]
debug = true
Expand Down Expand Up @@ -145,4 +138,4 @@ required-features = ["embassy", "async", "embassy-executor-thread"]

[[example]]
name = "direct-vectoring"
required-features = ["direct-vectoring"]
required-features = ["direct-vectoring"]
17 changes: 5 additions & 12 deletions esp32c6-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ crypto-bigint = { version = "0.5.5", default-features = false}
elliptic-curve = { version = "0.13.8", default-features = false, features = ["sec1"] }
embassy-executor = { version = "0.5.0", features = ["nightly"] }
embassy-sync = "0.5.0"
embassy-time = "0.3.0"
embedded-graphics = "0.8.1"
embedded-hal-1 = { version = "1.0.0", package = "embedded-hal" }
embedded-hal-async = "1.0.0"
Expand All @@ -49,7 +50,6 @@ sha2 = { version = "0.10.8", default-features = false}
smart-leds = "0.3.0"
ssd1306 = "0.8.4"
static_cell = { version = "2.0.0", features = ["nightly"] }
embassy-time = { version = "0.3.0" }

[features]
default = ["rt", "vectored", "zero-rtc-bss", "embassy-integrated-timers"]
Expand All @@ -73,18 +73,11 @@ init-rtc-data = ["esp-hal-common/rv-init-rtc-data"]

# Embassy support
embassy = ["esp-hal-common/embassy"]
embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time/tick-hz-16_000_000"]
embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time/tick-hz-1_000_000"]
embassy-executor-interrupt = ["esp-hal-common/embassy-executor-interrupt"]
embassy-executor-thread = ["esp-hal-common/embassy-executor-thread"]

# prefer integrated timers, but allow using the generic queue if needed
embassy-integrated-timers = ["esp-hal-common/embassy-integrated-timers"]
embassy-generic-queue-8 = ["esp-hal-common/embassy-generic-queue-8"]
embassy-generic-queue-16 = ["esp-hal-common/embassy-generic-queue-16"]
embassy-generic-queue-32 = ["esp-hal-common/embassy-generic-queue-32"]
embassy-generic-queue-64 = ["esp-hal-common/embassy-generic-queue-64"]
embassy-generic-queue-128 = ["esp-hal-common/embassy-generic-queue-128"]
embassy-integrated-timers = ["esp-hal-common/embassy-integrated-timers"]
embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time/tick-hz-16_000_000"]
embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time/tick-hz-1_000_000"]

[profile.release]
debug = true
Expand Down Expand Up @@ -155,4 +148,4 @@ required-features = ["embassy", "async", "embassy-executor-thread"]

[[example]]
name = "embassy_usb_serial_jtag"
required-features = ["embassy", "async", "embassy-executor-thread"]
required-features = ["embassy", "async", "embassy-executor-thread"]
17 changes: 5 additions & 12 deletions esp32h2-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ crypto-bigint = { version = "0.5.5", default-features = false }
elliptic-curve = { version = "0.13.8", default-features = false, features = ["sec1"] }
embassy-executor = { version = "0.5.0", features = ["nightly"] }
embassy-sync = "0.5.0"
embassy-time = "0.3.0"
embedded-graphics = "0.8.1"
embedded-hal-1 = { version = "1.0.0", package = "embedded-hal" }
embedded-hal-async = "1.0.0"
Expand All @@ -49,7 +50,6 @@ sha2 = { version = "0.10.8", default-features = false}
smart-leds = "0.3.0"
ssd1306 = "0.8.4"
static_cell = { version = "2.0.0", features = ["nightly"] }
embassy-time = { version = "0.3.0"}

[features]
default = ["rt", "vectored", "zero-rtc-bss", "embassy-integrated-timers"]
Expand All @@ -73,18 +73,11 @@ init-rtc-data = ["esp-hal-common/rv-init-rtc-data"]

# Embassy support
embassy = ["esp-hal-common/embassy"]
embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time/tick-hz-16_000_000"]
embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time/tick-hz-1_000_000"]
embassy-executor-interrupt = ["esp-hal-common/embassy-executor-interrupt"]
embassy-executor-thread = ["esp-hal-common/embassy-executor-thread"]

# prefer integrated timers, but allow using the generic queue if needed
embassy-integrated-timers = ["esp-hal-common/embassy-integrated-timers"]
embassy-generic-queue-8 = ["esp-hal-common/embassy-generic-queue-8"]
embassy-generic-queue-16 = ["esp-hal-common/embassy-generic-queue-16"]
embassy-generic-queue-32 = ["esp-hal-common/embassy-generic-queue-32"]
embassy-generic-queue-64 = ["esp-hal-common/embassy-generic-queue-64"]
embassy-generic-queue-128 = ["esp-hal-common/embassy-generic-queue-128"]
embassy-integrated-timers = ["esp-hal-common/embassy-integrated-timers"]
embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time/tick-hz-16_000_000"]
embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time/tick-hz-1_000_000"]

[profile.release]
debug = true
Expand Down Expand Up @@ -155,4 +148,4 @@ required-features = ["embassy", "async", "embassy-executor-thread"]

[[example]]
name = "embassy_usb_serial_jtag"
required-features = ["embassy", "async", "embassy-executor-thread"]
required-features = ["embassy", "async", "embassy-executor-thread"]
17 changes: 5 additions & 12 deletions esp32s2-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ critical-section = "1.1.2"
crypto-bigint = { version = "0.5.5", default-features = false }
embassy-executor = { version = "0.5.0", features = ["nightly"] }
embassy-sync = "0.5.0"
embassy-time = "0.3.0"
embedded-graphics = "0.8.1"
embedded-hal-1 = { version = "1.0.0", package = "embedded-hal" }
embedded-hal-async = "1.0.0"
Expand All @@ -50,7 +51,6 @@ ssd1306 = "0.8.4"
static_cell = { version = "2.0.0", features = ["nightly"] }
usb-device = "0.3.1"
usbd-serial = "0.2.0"
embassy-time = { version = "0.3.0" }

[features]
default = ["rt", "vectored", "embassy-integrated-timers"]
Expand All @@ -66,18 +66,11 @@ vectored = ["esp-hal-common/vectored"]

# Embassy support
embassy = ["esp-hal-common/embassy"]
embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time/tick-hz-80_000_000"]
embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time/tick-hz-1_000_000"]
embassy-executor-interrupt = ["esp-hal-common/embassy-executor-interrupt"]
embassy-executor-thread = ["esp-hal-common/embassy-executor-thread"]

# prefer integrated timers, but allow using the generic queue if needed
embassy-integrated-timers = ["esp-hal-common/embassy-integrated-timers"]
embassy-generic-queue-8 = ["esp-hal-common/embassy-generic-queue-8"]
embassy-generic-queue-16 = ["esp-hal-common/embassy-generic-queue-16"]
embassy-generic-queue-32 = ["esp-hal-common/embassy-generic-queue-32"]
embassy-generic-queue-64 = ["esp-hal-common/embassy-generic-queue-64"]
embassy-generic-queue-128 = ["esp-hal-common/embassy-generic-queue-128"]
embassy-integrated-timers = ["esp-hal-common/embassy-integrated-timers"]
embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time/tick-hz-80_000_000"]
embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time/tick-hz-1_000_000"]

# PSRAM support
psram = []
Expand Down Expand Up @@ -138,4 +131,4 @@ required-features = ["embassy", "async"]

[[example]]
name = "embassy_i2s_read"
required-features = ["embassy", "async"]
required-features = ["embassy", "async"]
17 changes: 5 additions & 12 deletions esp32s3-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ critical-section = "1.1.2"
crypto-bigint = { version = "0.5.5", default-features = false }
embassy-executor = { version = "0.5.0", features = ["nightly"] }
embassy-sync = "0.5.0"
embassy-time = "0.3.0"
embedded-graphics = "0.8.1"
embedded-hal = { version = "0.2.7", features = ["unproven"] }
embedded-hal-1 = { version = "1.0.0", package = "embedded-hal" }
Expand All @@ -50,7 +51,6 @@ ssd1306 = "0.8.4"
static_cell = { version = "2.0.0", features = ["nightly"] }
usb-device = "0.3.1"
usbd-serial = "0.2.0"
embassy-time = { version = "0.3.0" }

[features]
default = ["rt", "vectored", "embassy-integrated-timers"]
Expand All @@ -66,18 +66,11 @@ vectored = ["esp-hal-common/vectored"]

# Embassy support
embassy = ["esp-hal-common/embassy"]
embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time/tick-hz-16_000_000"]
embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time/tick-hz-1_000_000"]
embassy-executor-interrupt = ["esp-hal-common/embassy-executor-interrupt"]
embassy-executor-thread = ["esp-hal-common/embassy-executor-thread"]

# prefer integrated timers, but allow using the generic queue if needed
embassy-integrated-timers = ["esp-hal-common/embassy-integrated-timers"]
embassy-generic-queue-8 = ["esp-hal-common/embassy-generic-queue-8"]
embassy-generic-queue-16 = ["esp-hal-common/embassy-generic-queue-16"]
embassy-generic-queue-32 = ["esp-hal-common/embassy-generic-queue-32"]
embassy-generic-queue-64 = ["esp-hal-common/embassy-generic-queue-64"]
embassy-generic-queue-128 = ["esp-hal-common/embassy-generic-queue-128"]
embassy-integrated-timers = ["esp-hal-common/embassy-integrated-timers"]
embassy-time-systick = ["esp-hal-common/embassy-time-systick", "embassy-time/tick-hz-16_000_000"]
embassy-time-timg0 = ["esp-hal-common/embassy-time-timg0", "embassy-time/tick-hz-1_000_000"]

# PSRAM support
psram = []
Expand Down Expand Up @@ -163,4 +156,4 @@ required-features = ["embassy", "async"]

[[example]]
name = "embassy_usb_serial_jtag"
required-features = ["embassy", "async"]
required-features = ["embassy", "async"]

0 comments on commit 7ed2e8e

Please sign in to comment.