diff options
Diffstat (limited to 'examples/stm32l4/src/bin/button.rs')
| -rw-r--r-- | examples/stm32l4/src/bin/button.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/stm32l4/src/bin/button.rs b/examples/stm32l4/src/bin/button.rs index 962d5aa75..3efeee20f 100644 --- a/examples/stm32l4/src/bin/button.rs +++ b/examples/stm32l4/src/bin/button.rs | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | 8 | ||
| 9 | #[path = "../example_common.rs"] | 9 | #[path = "../example_common.rs"] |
| 10 | mod example_common; | 10 | mod example_common; |
| 11 | use embassy_stm32::gpio::{Input, Level, Output, Pull}; | 11 | use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; |
| 12 | use embedded_hal::digital::v2::{InputPin, OutputPin}; | 12 | use embedded_hal::digital::v2::{InputPin, OutputPin}; |
| 13 | use example_common::*; | 13 | use example_common::*; |
| 14 | 14 | ||
| @@ -40,8 +40,8 @@ fn main() -> ! { | |||
| 40 | let p = embassy_stm32::init(Default::default()); | 40 | let p = embassy_stm32::init(Default::default()); |
| 41 | 41 | ||
| 42 | let button = Input::new(p.PC13, Pull::Up); | 42 | let button = Input::new(p.PC13, Pull::Up); |
| 43 | let mut led1 = Output::new(p.PA5, Level::High); | 43 | let mut led1 = Output::new(p.PA5, Level::High, Speed::Low); |
| 44 | let mut led2 = Output::new(p.PB14, Level::High); | 44 | let mut led2 = Output::new(p.PB14, Level::High, Speed::Low); |
| 45 | 45 | ||
| 46 | loop { | 46 | loop { |
| 47 | if button.is_high().unwrap() { | 47 | if button.is_high().unwrap() { |
