Skip to content

Commit 4e52055

Browse files
committed
fmt
1 parent 448954a commit 4e52055

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

examples/comp.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,25 @@
88
#![no_main]
99
#![no_std]
1010

11-
1211
mod utils;
1312
extern crate cortex_m_rt as rt;
1413

15-
1614
use rt::entry;
1715

1816
#[cfg(not(feature = "stm32g474"))]
1917
#[entry]
2018
fn main() -> ! {
21-
loop{} // TODO: add support for more devices
19+
loop {} // TODO: add support for more devices
2220
}
2321

2422
#[cfg(feature = "stm32g474")]
2523
#[entry]
2624
fn main() -> ! {
27-
use hal::stm32;
2825
use hal::comparator::{ComparatorExt, ComparatorSplit, Config, Hysteresis, RefintInput};
2926
use hal::gpio::GpioExt;
3027
use hal::prelude::OutputPin;
3128
use hal::rcc::RccExt;
29+
use hal::stm32;
3230
use stm32g4xx_hal as hal;
3331

3432
let dp = stm32::Peripherals::take().expect("cannot take peripherals");

examples/comp_w_dac.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ use rt::entry;
1111
#[cfg(not(feature = "stm32g474"))]
1212
#[entry]
1313
fn main() -> ! {
14-
loop{} // TODO: add support for more devices
14+
loop {} // TODO: add support for more devices
1515
}
1616

1717
#[cfg(feature = "stm32g474")]
1818
#[entry]
1919
fn main() -> ! {
20-
use hal::stm32;
2120
use embedded_hal::Direction;
2221
use hal::comparator::{self, ComparatorExt, ComparatorSplit};
2322
use hal::dac::{Dac1IntSig1, DacExt, DacOut};
2423
use hal::delay::SYSTDelayExt;
2524
use hal::gpio::GpioExt;
2625
use hal::rcc::RccExt;
26+
use hal::stm32;
2727
use stm32g4xx_hal as hal;
2828

2929
let dp = stm32::Peripherals::take().expect("cannot take peripherals");

src/comparator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ use crate::gpio::*;
1515

1616
#[cfg(any(feature = "stm32g474"))]
1717
use crate::gpio::{
18+
gpioa::{PA11, PA12, PA6},
1819
gpiob::{PB6, PB7, PB8, PB9},
1920
gpioc::PC2,
2021
gpiof::PF4,
21-
gpioa::{PA11, PA12, PA6},
2222
};
2323

2424
#[cfg(any(

0 commit comments

Comments
 (0)