From 0eaadfc1253285c04340e32f14efa1133cb30dbe Mon Sep 17 00:00:00 2001 From: Thales Fragoso Date: Fri, 25 Jun 2021 17:32:24 -0300 Subject: stm32: Update gpio examples --- examples/stm32f4/src/bin/button.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/stm32f4/src/bin/button.rs') diff --git a/examples/stm32f4/src/bin/button.rs b/examples/stm32f4/src/bin/button.rs index 1ee99f527..c7160d219 100644 --- a/examples/stm32f4/src/bin/button.rs +++ b/examples/stm32f4/src/bin/button.rs @@ -8,7 +8,7 @@ #[path = "../example_common.rs"] mod example_common; -use embassy_stm32::gpio::{Input, Level, Output, Pull}; +use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed}; use embedded_hal::digital::v2::{InputPin, OutputPin}; use example_common::*; @@ -41,9 +41,9 @@ fn main() -> ! { let p = embassy_stm32::init(Default::default()); let button = Input::new(p.PC13, Pull::Down); - let mut led1 = Output::new(p.PB0, Level::High); - let _led2 = Output::new(p.PB7, Level::High); - let mut led3 = Output::new(p.PB14, Level::High); + let mut led1 = Output::new(p.PB0, Level::High, Speed::Low); + let _led2 = Output::new(p.PB7, Level::High, Speed::Low); + let mut led3 = Output::new(p.PB14, Level::High, Speed::Low); loop { if button.is_high().unwrap() { -- cgit