diff options
Diffstat (limited to 'examples/boot/application/stm32wl/src/bin/b.rs')
| -rw-r--r-- | examples/boot/application/stm32wl/src/bin/b.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/examples/boot/application/stm32wl/src/bin/b.rs b/examples/boot/application/stm32wl/src/bin/b.rs new file mode 100644 index 000000000..f2344bd53 --- /dev/null +++ b/examples/boot/application/stm32wl/src/bin/b.rs | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | #![no_std] | ||
| 2 | #![no_main] | ||
| 3 | #![feature(type_alias_impl_trait)] | ||
| 4 | |||
| 5 | #[cfg(feature = "defmt-rtt")] | ||
| 6 | use defmt_rtt::*; | ||
| 7 | use embassy::executor::Spawner; | ||
| 8 | use embassy::time::{Duration, Timer}; | ||
| 9 | use embassy_stm32::gpio::{Level, Output, Speed}; | ||
| 10 | use embassy_stm32::Peripherals; | ||
| 11 | use panic_reset as _; | ||
| 12 | |||
| 13 | #[embassy::main] | ||
| 14 | async fn main(_spawner: Spawner, p: Peripherals) { | ||
| 15 | let mut led = Output::new(p.PB15, Level::High, Speed::Low); | ||
| 16 | |||
| 17 | loop { | ||
| 18 | led.set_high(); | ||
| 19 | Timer::after(Duration::from_millis(500)).await; | ||
| 20 | |||
| 21 | led.set_low(); | ||
| 22 | Timer::after(Duration::from_millis(500)).await; | ||
| 23 | } | ||
| 24 | } | ||
