Skip to content

Commit 21795bb

Browse files
techmccatusbalbin
authored andcommitted
run cargo fmt
1 parent 5f6fcc0 commit 21795bb

16 files changed

+28
-28
lines changed

examples/adc-continious-dma.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ use crate::hal::{
1010
config::{Continuous, Dma as AdcDma, SampleTime, Sequence},
1111
AdcClaim, ClockSource, Temperature, Vref,
1212
},
13-
time::ExtU32,
14-
timer::Timer,
1513
delay::DelayFromCountDownTimer,
1614
dma::{config::DmaConfig, stream::DMAExt, TransferExt},
1715
gpio::GpioExt,
1816
pwr::PwrExt,
1917
rcc::{Config, RccExt},
2018
signature::{VrefCal, VDDA_CALIB},
2119
stm32::Peripherals,
20+
time::ExtU32,
21+
timer::Timer,
2222
};
2323
use stm32g4xx_hal as hal;
2424

examples/adc-continious.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ use crate::hal::{
66
config::{Continuous, Resolution, SampleTime, Sequence},
77
AdcClaim, ClockSource, Temperature, Vref,
88
},
9-
time::ExtU32,
10-
timer::Timer,
119
delay::DelayFromCountDownTimer,
1210
gpio::GpioExt,
1311
pwr::PwrExt,
1412
rcc::{Config, RccExt},
1513
signature::{VrefCal, VDDA_CALIB},
1614
stm32::Peripherals,
15+
time::ExtU32,
16+
timer::Timer,
1717
};
1818
use stm32g4xx_hal as hal;
1919

examples/adc-one-shot-dma.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,17 @@ use crate::hal::{
88
config::{Continuous, Dma as AdcDma, Resolution, SampleTime, Sequence},
99
AdcClaim, ClockSource, Temperature,
1010
},
11-
time::ExtU32,
12-
timer::Timer,
1311
delay::DelayFromCountDownTimer,
1412
dma::{config::DmaConfig, stream::DMAExt, TransferExt},
1513
gpio::GpioExt,
1614
pwr::PwrExt,
1715
rcc::{Config, RccExt},
1816
stm32::Peripherals,
17+
time::ExtU32,
18+
timer::Timer,
1919
};
2020
use stm32g4xx_hal as hal;
2121

22-
2322
#[macro_use]
2423
mod utils;
2524
use utils::logger::info;

examples/adc-one-shot.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
use crate::hal::{
55
adc::{config::SampleTime, AdcClaim},
6-
time::ExtU32,
7-
timer::Timer,
86
delay::DelayFromCountDownTimer,
97
pwr::PwrExt,
108
rcc::Config,
119
stm32::Peripherals,
10+
time::ExtU32,
11+
timer::Timer,
1212
};
1313
use hal::prelude::*;
1414
use stm32g4xx_hal as hal;

examples/blinky_delay.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#![no_main]
44
#![no_std]
55

6+
use embedded_hal::delay::DelayNs;
67
use hal::delay::DelayFromCountDownTimer;
78
use hal::prelude::*;
89
use hal::pwr::PwrExt;
@@ -11,7 +12,6 @@ use hal::stm32;
1112
use hal::time::ExtU32;
1213
use hal::timer::Timer;
1314
use stm32g4xx_hal as hal;
14-
use embedded_hal::delay::DelayNs;
1515

1616
use cortex_m_rt::entry;
1717
use utils::logger::info;

examples/comp_w_dac.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ use rt::entry;
1111
#[entry]
1212
fn main() -> ! {
1313
use embedded_hal_old::Direction;
14-
use stm32g4xx_hal as hal;
1514
use hal::comparator::{self, ComparatorExt, ComparatorSplit};
1615
use hal::dac::{Dac1IntSig1, DacExt, DacOut};
1716
use hal::delay::DelayFromCountDownTimer;
18-
use hal::time::ExtU32;
19-
use hal::timer::Timer;
2017
use hal::gpio::GpioExt;
2118
use hal::rcc::RccExt;
2219
use hal::stm32;
20+
use hal::time::ExtU32;
21+
use hal::timer::Timer;
22+
use stm32g4xx_hal as hal;
2323

2424
let dp = stm32::Peripherals::take().expect("cannot take peripherals");
2525
// let cp = cortex_m::Peripherals::take().expect("cannot take core peripherals");

examples/dac.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010

1111
use embedded_hal_old::Direction;
1212
use hal::dac::{DacExt, DacOut, GeneratorConfig};
13+
use hal::delay::DelayFromCountDownTimer;
1314
use hal::gpio::GpioExt;
1415
use hal::rcc::RccExt;
1516
use hal::time::ExtU32;
1617
use hal::timer::Timer;
17-
use hal::delay::DelayFromCountDownTimer;
1818
use stm32g4xx_hal as hal;
1919
mod utils;
2020
extern crate cortex_m_rt as rt;

examples/spi-example.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ use hal::{
1212
gpio::gpioa::PA7,
1313
gpio::Alternate,
1414
gpio::AF5,
15+
hal_02::spi::FullDuplex,
1516
prelude::*,
1617
pwr::PwrExt,
1718
rcc::Config,
1819
spi,
1920
stm32::Peripherals,
2021
time::{ExtU32, RateExtU32},
2122
timer::Timer,
22-
hal_02::spi::FullDuplex,
2323
};
2424

2525
use cortex_m_rt::entry;

examples/uart-fifo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ extern crate cortex_m_rt as rt;
77

88
use core::fmt::Write;
99

10-
use stm32g4xx_hal as hal;
1110
use hal::prelude::*;
1211
use hal::pwr::PwrExt;
1312
use hal::serial::*;
1413
use hal::{rcc, stm32};
14+
use stm32g4xx_hal as hal;
1515
// TODO: switch to embedded-hal-nb
1616
use hal::hal_02::serial::Read;
1717

src/adc.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@ use crate::{
2020
};
2121
use core::fmt;
2222
use core::marker::PhantomData;
23-
use embedded_hal_old::{
24-
adc::{Channel, OneShot},
25-
};
2623
use embedded_hal::delay::DelayNs;
24+
use embedded_hal_old::adc::{Channel, OneShot};
2725

2826
use self::config::ExternalTrigger12;
2927

0 commit comments

Comments
 (0)