Skip to content

Commit b153cc3

Browse files
committed
fmt
1 parent d2aa379 commit b153cc3

File tree

12 files changed

+30
-19
lines changed

12 files changed

+30
-19
lines changed

examples/blinky_delay.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ use hal::delay::DelayFromCountDownTimer;
77
use hal::prelude::*;
88
use hal::rcc::Config;
99
use hal::stm32;
10-
use hal::timer::Timer;
1110
use hal::time::ExtU32;
11+
use hal::timer::Timer;
1212
use stm32g4xx_hal as hal;
1313

1414
use cortex_m_rt::entry;

examples/i2c-bme680.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ use hal::delay::DelayFromCountDownTimer;
1010
use hal::i2c::Config;
1111
use hal::prelude::*;
1212
use hal::stm32;
13+
use hal::time::{ExtU32, RateExtU32};
1314
use hal::timer::Timer;
1415
use stm32g4xx_hal as hal;
15-
use hal::time::{ExtU32, RateExtU32};
1616

1717
use cortex_m_rt::entry;
1818
use log::info;

examples/i2c-mpu6050.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
use hal::i2c::Config;
77
use hal::prelude::*;
88
use hal::stm32;
9-
use stm32g4xx_hal as hal;
109
use hal::time::{ExtU32, RateExtU32};
10+
use stm32g4xx_hal as hal;
1111

1212
use cortex_m_rt::entry;
1313
use log::info;

examples/i2c.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
use hal::i2c::Config;
77
use hal::prelude::*;
88
use hal::stm32;
9-
use stm32g4xx_hal as hal;
109
use hal::time::RateExtU32;
10+
use stm32g4xx_hal as hal;
1111

1212
use cortex_m_rt::entry;
1313
use log::info;

examples/pwm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ use hal::gpio::Alternate;
88
use hal::gpio::AF6;
99
use hal::prelude::*;
1010
use hal::stm32;
11-
use stm32g4xx_hal as hal;
1211
use hal::time::RateExtU32;
12+
use stm32g4xx_hal as hal;
1313
mod utils;
1414
extern crate cortex_m_rt as rt;
1515

examples/spi-example.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,19 @@
66
#![no_std]
77

88
use crate::hal::{
9-
block, delay::DelayFromCountDownTimer, gpio::gpioa::PA5, gpio::gpioa::PA6, gpio::gpioa::PA7,
10-
gpio::Alternate, gpio::AF5, prelude::*, rcc::Config, spi, stm32::Peripherals, timer::Timer, time::{ExtU32, RateExtU32}
9+
block,
10+
delay::DelayFromCountDownTimer,
11+
gpio::gpioa::PA5,
12+
gpio::gpioa::PA6,
13+
gpio::gpioa::PA7,
14+
gpio::Alternate,
15+
gpio::AF5,
16+
prelude::*,
17+
rcc::Config,
18+
spi,
19+
stm32::Peripherals,
20+
time::{ExtU32, RateExtU32},
21+
timer::Timer,
1122
};
1223

1324
use cortex_m_rt::entry;

examples/spi-sd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ use hal::rcc::Config;
1616
use hal::spi;
1717
use hal::stm32;
1818
use hal::stm32::Peripherals;
19+
use hal::time::RateExtU32;
1920
use hal::timer::Timer;
2021
use stm32g4xx_hal as hal;
21-
use hal::time::RateExtU32;
2222

2323
use embedded_sdmmc::{
2424
Block, BlockCount, BlockDevice, BlockIdx, Controller, Error, Mode, TimeSource, Timestamp,

examples/uart-dma.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ use core::fmt::Write;
1010
use hal::dma::{config::DmaConfig, stream::DMAExt, TransferExt};
1111
use hal::prelude::*;
1212
use hal::serial::*;
13+
use hal::time::ExtU32;
1314
use hal::{rcc, stm32};
1415
use stm32g4xx_hal as hal;
15-
use hal::time::ExtU32;
1616

1717
use cortex_m_rt::entry;
1818
use log::info;

src/delay.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ use cortex_m::peripheral::SYST;
4343

4444
use crate::nb::block;
4545
use crate::time::ExtU32;
46-
use embedded_hal::{
47-
blocking::delay::{DelayMs, DelayUs},
48-
};
46+
use embedded_hal::blocking::delay::{DelayMs, DelayUs};
4947

5048
pub trait CountDown: embedded_hal::timer::CountDown {
5149
fn max_period(&self) -> MicroSecond;
@@ -120,7 +118,7 @@ macro_rules! impl_delay_from_count_down_timer {
120118
assert!(time_left_us <= max_sleep_us);
121119

122120
let time_left: MicroSecond = (time_left_us as u32).micros();
123-
121+
124122
// Only sleep
125123
if time_left.ticks() > 0 {
126124
self.0.start(time_left);

src/pwm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ use crate::stm32::TIM5;
195195
use crate::stm32::{TIM1, TIM15, TIM16, TIM17, TIM2, TIM3, TIM4, TIM8};
196196

197197
use crate::rcc::{Enable, GetBusFreq, Rcc, Reset};
198-
use crate::time::{Hertz, NanoSecond, ExtU32, RateExtU32};
198+
use crate::time::{ExtU32, Hertz, NanoSecond, RateExtU32};
199199

200200
#[cfg(any(
201201
feature = "stm32g471",

0 commit comments

Comments
 (0)