From 32ccce2c7561f4f15db6311576e81a6e70c52101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Tue, 17 Dec 2024 10:23:46 +0100 Subject: [PATCH] Remove integrated-timer references --- esp-hal-embassy/Cargo.toml | 2 +- esp-hal-embassy/src/lib.rs | 2 +- esp-hal-embassy/src/time_driver.rs | 2 +- examples/src/bin/embassy_hello_world.rs | 2 +- examples/src/bin/embassy_multiprio.rs | 2 +- hil-test/Cargo.toml | 1 - hil-test/tests/embassy_interrupt_executor.rs | 3 ++- hil-test/tests/embassy_interrupt_spi_dma.rs | 3 ++- hil-test/tests/embassy_timers_executors.rs | 3 ++- hil-test/tests/gpio_custom_handler.rs | 4 +++- xtask/src/main.rs | 2 +- 11 files changed, 15 insertions(+), 11 deletions(-) diff --git a/esp-hal-embassy/Cargo.toml b/esp-hal-embassy/Cargo.toml index 1c88fff67d0..594e986e316 100644 --- a/esp-hal-embassy/Cargo.toml +++ b/esp-hal-embassy/Cargo.toml @@ -53,7 +53,7 @@ executors = ["dep:embassy-executor", "esp-hal/__esp_hal_embassy"] ## provides an executor-integrated timer queue which does not need a set capacity. generic-queue = ["embassy-time-queue-driver/_generic-queue"] ## Use a single, global timer queue. This option only needs a single alarm, no matter how many -## executors are used. Ignored if `integrated-timers` is not set. +## executors are used. Ignored if `generic-queue` is set. single-queue = [] [lints.rust] diff --git a/esp-hal-embassy/src/lib.rs b/esp-hal-embassy/src/lib.rs index eb89c27ffce..159946ba789 100644 --- a/esp-hal-embassy/src/lib.rs +++ b/esp-hal-embassy/src/lib.rs @@ -143,7 +143,7 @@ impl_array!(4); /// - A mutable static array of `OneShotTimer` instances /// - A 2, 3, 4 element array of `AnyTimer` instances /// -/// Note that if you use the `integrated-timers` feature, +/// Note that unless you use the `generic-queue` or the `single-queue` feature, /// you need to pass as many timers as you start executors. /// /// # Examples diff --git a/esp-hal-embassy/src/time_driver.rs b/esp-hal-embassy/src/time_driver.rs index d86f2f2d839..196b26abc48 100644 --- a/esp-hal-embassy/src/time_driver.rs +++ b/esp-hal-embassy/src/time_driver.rs @@ -222,7 +222,7 @@ impl EmbassyTimer { pub(crate) fn set_alarm(&self, alarm: AlarmHandle, timestamp: u64) -> bool { let alarm = &self.alarms[alarm.id]; - // If `embassy-executor/integrated-timers` is enabled and there are no pending + // If integrated timers are used and there are no pending // timers, embassy still calls `set_alarm` with `u64::MAX`. By returning // `true` we signal that no re-polling is necessary. if timestamp == u64::MAX { diff --git a/examples/src/bin/embassy_hello_world.rs b/examples/src/bin/embassy_hello_world.rs index c8c54354b50..b11e31e752c 100644 --- a/examples/src/bin/embassy_hello_world.rs +++ b/examples/src/bin/embassy_hello_world.rs @@ -4,7 +4,7 @@ //! concurrently. //% CHIPS: esp32 esp32c2 esp32c3 esp32c6 esp32h2 esp32s2 esp32s3 -//% FEATURES: embassy esp-hal-embassy/integrated-timers esp-hal/unstable +//% FEATURES: embassy esp-hal/unstable #![no_std] #![no_main] diff --git a/examples/src/bin/embassy_multiprio.rs b/examples/src/bin/embassy_multiprio.rs index ae94ed0a0c5..f72f1f6feb1 100644 --- a/examples/src/bin/embassy_multiprio.rs +++ b/examples/src/bin/embassy_multiprio.rs @@ -15,7 +15,7 @@ // The interrupt-executor is created in `main` and is used to spawn `high_prio`. //% CHIPS: esp32 esp32c2 esp32c3 esp32c6 esp32h2 esp32s2 esp32s3 -//% FEATURES: embassy esp-hal-embassy/log esp-hal-embassy/integrated-timers esp-hal/unstable +//% FEATURES: embassy esp-hal-embassy/log esp-hal/unstable #![no_std] #![no_main] diff --git a/hil-test/Cargo.toml b/hil-test/Cargo.toml index 8d9e431c4fc..6b345cc5496 100644 --- a/hil-test/Cargo.toml +++ b/hil-test/Cargo.toml @@ -290,7 +290,6 @@ embassy = [ "embedded-test/external-executor", "dep:esp-hal-embassy", ] -integrated-timers = ["esp-hal-embassy?/integrated-timers"] octal-psram = ["esp-hal/octal-psram", "esp-alloc"] # https://doc.rust-lang.org/cargo/reference/profiles.html#test diff --git a/hil-test/tests/embassy_interrupt_executor.rs b/hil-test/tests/embassy_interrupt_executor.rs index a3503ee1529..7030e1015b6 100644 --- a/hil-test/tests/embassy_interrupt_executor.rs +++ b/hil-test/tests/embassy_interrupt_executor.rs @@ -2,8 +2,9 @@ //! code. //% CHIPS: esp32 esp32c2 esp32c3 esp32c6 esp32h2 esp32s2 esp32s3 -//% FEATURES: integrated-timers //% FEATURES: +//% FEATURES: esp-hal-embassy/single-queue +//% FEATURES: esp-hal-embassy/generic-queue #![no_std] #![no_main] diff --git a/hil-test/tests/embassy_interrupt_spi_dma.rs b/hil-test/tests/embassy_interrupt_spi_dma.rs index 8229365f06d..de0cb93010f 100644 --- a/hil-test/tests/embassy_interrupt_spi_dma.rs +++ b/hil-test/tests/embassy_interrupt_spi_dma.rs @@ -1,8 +1,9 @@ //! Reproduction and regression test for a sneaky issue. //% CHIPS: esp32 esp32s2 esp32s3 esp32c3 esp32c6 esp32h2 -//% FEATURES: integrated-timers //% FEATURES: +//% FEATURES: esp-hal-embassy/single-queue +//% FEATURES: esp-hal-embassy/generic-queue #![no_std] #![no_main] diff --git a/hil-test/tests/embassy_timers_executors.rs b/hil-test/tests/embassy_timers_executors.rs index 7d832e877f7..038b7283e53 100644 --- a/hil-test/tests/embassy_timers_executors.rs +++ b/hil-test/tests/embassy_timers_executors.rs @@ -1,8 +1,9 @@ //! Embassy timer and executor Test //% CHIPS: esp32 esp32c2 esp32c3 esp32c6 esp32h2 esp32s2 esp32s3 -//% FEATURES: integrated-timers //% FEATURES: +//% FEATURES: esp-hal-embassy/single-queue +//% FEATURES: esp-hal-embassy/generic-queue #![no_std] #![no_main] diff --git a/hil-test/tests/gpio_custom_handler.rs b/hil-test/tests/gpio_custom_handler.rs index c7033206740..a7329287172 100644 --- a/hil-test/tests/gpio_custom_handler.rs +++ b/hil-test/tests/gpio_custom_handler.rs @@ -6,7 +6,9 @@ //! async API works for user handlers automatically. //% CHIPS: esp32 esp32c2 esp32c3 esp32c6 esp32h2 esp32s2 esp32s3 -//% FEATURES: integrated-timers +//% FEATURES: +//% FEATURES: esp-hal-embassy/single-queue +//% FEATURES: esp-hal-embassy/generic-queue #![no_std] #![no_main] diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 775bb86829c..1797dc348f2 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -644,7 +644,7 @@ fn lint_packages(workspace: &Path, args: LintPackagesArgs) -> Result<()> { &[ "-Zbuild-std=core", &format!("--target={}", chip.target()), - &format!("--features={chip},executors,defmt,integrated-timers,esp-hal/unstable"), + &format!("--features={chip},executors,defmt,esp-hal/unstable"), ], args.fix, )?;