diff options
| author | xoviat <[email protected]> | 2023-10-25 19:07:31 -0500 |
|---|---|---|
| committer | xoviat <[email protected]> | 2023-10-25 19:07:31 -0500 |
| commit | e8a3cfaed6b3e0ee9e77e16caf51d4479c89090f (patch) | |
| tree | f1322c8ed0e9261ab712bcc108e164d8ec419cf1 /tests | |
| parent | 0cc3e18db65dd2d6ae173e94014973741f14e2ee (diff) | |
stm32/low-power: refactor refcount
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/stm32/src/bin/stop.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/stm32/src/bin/stop.rs b/tests/stm32/src/bin/stop.rs index 4f62ecae2..b9810673a 100644 --- a/tests/stm32/src/bin/stop.rs +++ b/tests/stm32/src/bin/stop.rs | |||
| @@ -10,8 +10,8 @@ use chrono::NaiveDate; | |||
| 10 | use common::*; | 10 | use common::*; |
| 11 | use cortex_m_rt::entry; | 11 | use cortex_m_rt::entry; |
| 12 | use embassy_executor::Spawner; | 12 | use embassy_executor::Spawner; |
| 13 | use embassy_stm32::low_power::{stop_with_rtc, Executor}; | 13 | use embassy_stm32::low_power::{stop_ready, stop_with_rtc, Executor, StopMode}; |
| 14 | use embassy_stm32::rcc::{low_power_ready, LsConfig}; | 14 | use embassy_stm32::rcc::LsConfig; |
| 15 | use embassy_stm32::rtc::{Rtc, RtcConfig}; | 15 | use embassy_stm32::rtc::{Rtc, RtcConfig}; |
| 16 | use embassy_stm32::Config; | 16 | use embassy_stm32::Config; |
| 17 | use embassy_time::Timer; | 17 | use embassy_time::Timer; |
| @@ -28,7 +28,7 @@ fn main() -> ! { | |||
| 28 | async fn task_1() { | 28 | async fn task_1() { |
| 29 | for _ in 0..9 { | 29 | for _ in 0..9 { |
| 30 | info!("task 1: waiting for 500ms..."); | 30 | info!("task 1: waiting for 500ms..."); |
| 31 | defmt::assert!(low_power_ready()); | 31 | defmt::assert!(stop_ready(StopMode::Stop2)); |
| 32 | Timer::after_millis(500).await; | 32 | Timer::after_millis(500).await; |
| 33 | } | 33 | } |
| 34 | } | 34 | } |
| @@ -37,7 +37,7 @@ async fn task_1() { | |||
| 37 | async fn task_2() { | 37 | async fn task_2() { |
| 38 | for _ in 0..5 { | 38 | for _ in 0..5 { |
| 39 | info!("task 2: waiting for 1000ms..."); | 39 | info!("task 2: waiting for 1000ms..."); |
| 40 | defmt::assert!(low_power_ready()); | 40 | defmt::assert!(stop_ready(StopMode::Stop2)); |
| 41 | Timer::after_millis(1000).await; | 41 | Timer::after_millis(1000).await; |
| 42 | } | 42 | } |
| 43 | 43 | ||
