diff options
| author | xoviat <[email protected]> | 2023-09-17 19:03:45 -0500 |
|---|---|---|
| committer | xoviat <[email protected]> | 2023-09-17 19:03:45 -0500 |
| commit | 0dcb34fc7d6134ff8d8c4795209d2feb217920dc (patch) | |
| tree | 26f1f7c2e538bb9a23452407960e69a01315c235 /tests | |
| parent | feaeee1e835bf3e2a6b36fc8d2d45d4cbc5c27a3 (diff) | |
ci: fix tests
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/stm32/src/bin/rtc.rs | 4 | ||||
| -rw-r--r-- | tests/stm32/src/bin/stop.rs | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/tests/stm32/src/bin/rtc.rs b/tests/stm32/src/bin/rtc.rs index 1a64dd387..22be6fac5 100644 --- a/tests/stm32/src/bin/rtc.rs +++ b/tests/stm32/src/bin/rtc.rs | |||
| @@ -12,13 +12,15 @@ use defmt::assert; | |||
| 12 | use embassy_executor::Spawner; | 12 | use embassy_executor::Spawner; |
| 13 | use embassy_stm32::rcc::RtcClockSource; | 13 | use embassy_stm32::rcc::RtcClockSource; |
| 14 | use embassy_stm32::rtc::{Rtc, RtcConfig}; | 14 | use embassy_stm32::rtc::{Rtc, RtcConfig}; |
| 15 | use embassy_stm32::time::Hertz; | ||
| 15 | use embassy_time::{Duration, Timer}; | 16 | use embassy_time::{Duration, Timer}; |
| 16 | 17 | ||
| 17 | #[embassy_executor::main] | 18 | #[embassy_executor::main] |
| 18 | async fn main(_spawner: Spawner) { | 19 | async fn main(_spawner: Spawner) { |
| 19 | let mut config = config(); | 20 | let mut config = config(); |
| 20 | 21 | ||
| 21 | config.rcc.rtc = Some(RtcClockSource::LSI); | 22 | config.rcc.lse = Some(Hertz(32_768)); |
| 23 | config.rcc.rtc = Some(RtcClockSource::LSE); | ||
| 22 | 24 | ||
| 23 | let p = embassy_stm32::init(config); | 25 | let p = embassy_stm32::init(config); |
| 24 | info!("Hello World!"); | 26 | info!("Hello World!"); |
diff --git a/tests/stm32/src/bin/stop.rs b/tests/stm32/src/bin/stop.rs index a490d7b8c..f60ab271a 100644 --- a/tests/stm32/src/bin/stop.rs +++ b/tests/stm32/src/bin/stop.rs | |||
| @@ -13,6 +13,7 @@ use embassy_executor::Spawner; | |||
| 13 | use embassy_stm32::low_power::{stop_with_rtc, Executor}; | 13 | use embassy_stm32::low_power::{stop_with_rtc, Executor}; |
| 14 | use embassy_stm32::rcc::RtcClockSource; | 14 | use embassy_stm32::rcc::RtcClockSource; |
| 15 | use embassy_stm32::rtc::{Rtc, RtcConfig}; | 15 | use embassy_stm32::rtc::{Rtc, RtcConfig}; |
| 16 | use embassy_stm32::time::Hertz; | ||
| 16 | use embassy_time::{Duration, Timer}; | 17 | use embassy_time::{Duration, Timer}; |
| 17 | use static_cell::make_static; | 18 | use static_cell::make_static; |
| 18 | 19 | ||
| @@ -28,7 +29,8 @@ fn main() -> ! { | |||
| 28 | async fn async_main(_spawner: Spawner) { | 29 | async fn async_main(_spawner: Spawner) { |
| 29 | let mut config = config(); | 30 | let mut config = config(); |
| 30 | 31 | ||
| 31 | config.rcc.rtc = Some(RtcClockSource::LSI); | 32 | config.rcc.lse = Some(Hertz(32_768)); |
| 33 | config.rcc.rtc = Some(RtcClockSource::LSE); | ||
| 32 | 34 | ||
| 33 | let p = embassy_stm32::init(config); | 35 | let p = embassy_stm32::init(config); |
| 34 | info!("Hello World!"); | 36 | info!("Hello World!"); |
