diff options
author | Brian Cully <bjc@kublai.com> | 2022-10-27 20:08:42 -0400 |
---|---|---|
committer | Brian Cully <bjc@kublai.com> | 2022-10-27 20:08:42 -0400 |
commit | 1316d1fe605d0b67571187dc23ea099dd9612d6c (patch) | |
tree | eb94dd4d3fe8fcfe8672d5e35a1549576cb1fc50 /src | |
parent | 0b5803f641d2ab7d42ac498ecccae7d3b3cbc298 (diff) | |
download | luchie-1316d1fe605d0b67571187dc23ea099dd9612d6c.tar.gz luchie-1316d1fe605d0b67571187dc23ea099dd9612d6c.zip |
led: rustfmt
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 { |