diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/led.rs | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,6 +1,4 @@ -use stm32f1xx_hal::{ - gpio::{Cr, CRL, Floating, Input, Output, PushPull, gpiob::PB2}, -}; +use stm32f1xx_hal::gpio::{gpiob::PB2, Cr, Floating, Input, Output, PushPull, CRL}; enum State { Low, @@ -19,7 +17,10 @@ impl LED { pub fn new(pin: LEDPin<Input<Floating>>, cr: &mut Cr<CRL, 'B'>) -> Self { let mut p = pin.into_push_pull_output(cr); p.set_low(); - Self { pin: p, state: State::Low } + Self { + pin: p, + state: State::Low, + } } pub fn is_on(&self) -> bool { |