summaryrefslogtreecommitdiff
path: root/examples/stm32f1
diff options
context:
space:
mode:
authorDario Nieuwenhuis <dirbaio@dirbaio.net>2022-01-14 22:02:00 +0100
committerDario Nieuwenhuis <dirbaio@dirbaio.net>2022-01-19 17:59:55 +0100
commit58fc64722c65bbdc209ae0fd1700f03702bbcd08 (patch)
tree77f9412b47259cd4cf4170b0a257b371398d4f2c /examples/stm32f1
parent52e156b429417bde59d0ea67d11256866f1dcec9 (diff)
downloadembassy-58fc64722c65bbdc209ae0fd1700f03702bbcd08.zip
stm32/gpio: expose all functionality as inherent methods.
Diffstat (limited to 'examples/stm32f1')
-rw-r--r--examples/stm32f1/src/bin/blinky.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/stm32f1/src/bin/blinky.rs b/examples/stm32f1/src/bin/blinky.rs
index 1e4f2dee..0d953745 100644
--- a/examples/stm32f1/src/bin/blinky.rs
+++ b/examples/stm32f1/src/bin/blinky.rs
@@ -8,7 +8,6 @@ use embassy::executor::Spawner;
use embassy::time::{Duration, Timer};
use embassy_stm32::gpio::{Level, Output, Speed};
use embassy_stm32::Peripherals;
-use embedded_hal::digital::v2::OutputPin;
use example_common::*;
#[embassy::main]
@@ -19,11 +18,11 @@ async fn main(_spawner: Spawner, p: Peripherals) {
loop {
info!("high");
- unwrap!(led.set_high());
+ led.set_high();
Timer::after(Duration::from_millis(300)).await;
info!("low");
- unwrap!(led.set_low());
+ led.set_low();
Timer::after(Duration::from_millis(300)).await;
}
}