Skip to content

Commit ec4fe56

Browse files
committed
Run cargo fmt
1 parent 11680a0 commit ec4fe56

File tree

6 files changed

+25
-24
lines changed

6 files changed

+25
-24
lines changed

on-target-tests/tests/dma_spi_loopback_u16.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ use crate::hal::dma::Channels;
88
use defmt_rtt as _; // defmt transport
99
use defmt_test as _;
1010
use hal::gpio::{self, Pin};
11+
use hal::pac::SPI0;
12+
use hal::spi;
1113
use panic_probe as _;
1214
#[cfg(feature = "rp2040")]
1315
use rp2040_hal as hal; // memory layout // panic handler
1416
#[cfg(feature = "rp235x")]
1517
use rp235x_hal as hal;
16-
use hal::pac::SPI0;
17-
use hal::spi;
1818

1919
/// The linker will place this boot block at the start of our program image. We
2020
/// need this to help the ROM bootloader get our code up and running.
@@ -66,14 +66,14 @@ mod tests {
6666
use defmt::assert_eq;
6767
use defmt_rtt as _;
6868
use fugit::RateExtU32;
69+
use hal::dma::{bidirectional, DMAExt};
70+
use hal::Clock;
6971
use hal::{clocks::init_clocks_and_plls, pac, watchdog::Watchdog};
7072
use panic_probe as _;
7173
#[cfg(feature = "rp2040")]
7274
use rp2040_hal as hal;
7375
#[cfg(feature = "rp235x")]
7476
use rp235x_hal as hal;
75-
use hal::dma::{bidirectional, DMAExt};
76-
use hal::Clock;
7777

7878
#[init]
7979
fn setup() -> State {

on-target-tests/tests/dma_spi_loopback_u8.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
use crate::hal::dma::Channels;
88
use defmt_rtt as _; // defmt transport
99
use defmt_test as _;
10+
use hal::gpio::{self, Pin};
11+
use hal::pac::SPI0;
12+
use hal::spi;
1013
use panic_probe as _;
1114
#[cfg(feature = "rp2040")]
1215
use rp2040_hal as hal; // memory layout // panic handler
1316
#[cfg(feature = "rp235x")]
1417
use rp235x_hal as hal;
15-
use hal::gpio::{self, Pin};
16-
use hal::pac::SPI0;
17-
use hal::spi;
1818

1919
/// The linker will place this boot block at the start of our program image. We
2020
/// need this to help the ROM bootloader get our code up and running.
@@ -66,15 +66,15 @@ mod tests {
6666
use defmt::assert_eq;
6767
use defmt_rtt as _;
6868
use fugit::RateExtU32;
69+
use hal::dma::bidirectional;
70+
use hal::dma::DMAExt;
71+
use hal::Clock;
6972
use hal::{clocks::init_clocks_and_plls, pac, watchdog::Watchdog};
7073
use panic_probe as _;
7174
#[cfg(feature = "rp2040")]
7275
use rp2040_hal as hal;
7376
#[cfg(feature = "rp235x")]
7477
use rp235x_hal as hal;
75-
use hal::dma::bidirectional;
76-
use hal::dma::DMAExt;
77-
use hal::Clock;
7878

7979
#[init]
8080
fn setup() -> State {

on-target-tests/tests/gpio.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ mod tests {
3535
use crate::hal::clocks::init_clocks_and_plls;
3636
use crate::hal::pac;
3737
use crate::XTAL_FREQ_HZ;
38-
use hal::watchdog::Watchdog;
3938
use hal::gpio::{PinGroup, PinState};
39+
use hal::watchdog::Watchdog;
4040

4141
#[init]
4242
fn setup() -> () {

on-target-tests/tests/i2c_tests/blocking.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ use core::{cell::RefCell, ops::RangeInclusive};
22

33
use critical_section::Mutex;
44
use fugit::{HertzU32, RateExtU32};
5-
#[cfg(feature = "rp2040")]
6-
use rp2040_hal as hal;
7-
#[cfg(feature = "rp235x")]
8-
use rp235x_hal as hal;
95
use hal::{
106
clocks::init_clocks_and_plls,
117
gpio::{FunctionI2C, Pin, PullUp},
@@ -14,6 +10,10 @@ use hal::{
1410
watchdog::Watchdog,
1511
Clock, Timer,
1612
};
13+
#[cfg(feature = "rp2040")]
14+
use rp2040_hal as hal;
15+
#[cfg(feature = "rp235x")]
16+
use rp235x_hal as hal;
1717

1818
use super::{Controller, FIFOBuffer, Generator, MutexCell, Target, TargetState};
1919

@@ -33,7 +33,8 @@ static PAYLOAD: MutexCell<TargetState> = MutexCell::new(RefCell::new(TargetState
3333
#[cfg(feature = "rp2040")]
3434
static TIMER: MutexCell<Option<Timer>> = MutexCell::new(RefCell::new(None));
3535
#[cfg(feature = "rp235x")]
36-
static TIMER: MutexCell<Option<Timer<hal::timer::CopyableTimer0>>> = MutexCell::new(RefCell::new(None));
36+
static TIMER: MutexCell<Option<Timer<hal::timer::CopyableTimer0>>> =
37+
MutexCell::new(RefCell::new(None));
3738

3839
macro_rules! assert_vec_eq {
3940
($e:expr) => {

on-target-tests/tests/i2c_tests/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
use core::cell::RefCell;
22

33
use critical_section::Mutex;
4-
#[cfg(feature = "rp2040")]
5-
use rp2040_hal as hal;
6-
#[cfg(feature = "rp235x")]
7-
use rp235x_hal as hal;
84
use hal::{
95
gpio::{
106
bank0::{Gpio0, Gpio1, Gpio2, Gpio3},
117
FunctionI2C, Pin, PullUp,
128
},
139
i2c::peripheral::Event,
1410
};
11+
#[cfg(feature = "rp2040")]
12+
use rp2040_hal as hal;
13+
#[cfg(feature = "rp235x")]
14+
use rp235x_hal as hal;
1515

1616
pub mod blocking;
1717
pub mod non_blocking;

on-target-tests/tests/i2c_tests/non_blocking.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ use fugit::{HertzU32, RateExtU32};
99
use futures::FutureExt;
1010
use heapless::Vec;
1111

12-
#[cfg(feature = "rp2040")]
13-
use rp2040_hal as hal;
14-
#[cfg(feature = "rp235x")]
15-
use rp235x_hal as hal;
1612
use hal::{
1713
clocks::init_clocks_and_plls,
1814
gpio::{FunctionI2C, Pin, PullUp},
@@ -21,6 +17,10 @@ use hal::{
2117
watchdog::Watchdog,
2218
Clock,
2319
};
20+
#[cfg(feature = "rp2040")]
21+
use rp2040_hal as hal;
22+
#[cfg(feature = "rp235x")]
23+
use rp235x_hal as hal;
2424

2525
use super::{Controller, FIFOBuffer, Generator, Target, TargetState};
2626

0 commit comments

Comments
 (0)