Skip to content

Commit c55012e

Browse files
committed
Cleanup gpio tests
1 parent 20bf75c commit c55012e

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

testsuite/tests/gpio_input.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ mod tests {
1818
use defmt::{assert, unwrap};
1919
use stm32f3xx_hal::{pac, prelude::*};
2020

21-
// Test the defaults with no configuration
2221
#[init]
2322
fn init() -> super::State {
2423
let dp = unwrap!(pac::Peripherals::take());

testsuite/tests/gpio_input_puller.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ mod tests {
2222
use super::*;
2323
use defmt::{assert, unwrap};
2424

25-
// Test the defaults with no configuration
2625
#[init]
2726
fn init() -> super::State {
2827
let dp = unwrap!(pac::Peripherals::take());

testsuite/tests/gpio_output_open_drain.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
use defmt_rtt as _;
55
use panic_probe as _;
66

7-
87
use stm32f3xx_hal as hal;
98

109
use hal::gpio::{Input, OpenDrain, Output, PXx};
@@ -16,11 +15,10 @@ struct State {
1615

1716
#[defmt_test::tests]
1817
mod tests {
18+
use cortex_m::asm;
1919
use defmt::{assert, unwrap};
2020
use stm32f3xx_hal::{pac, prelude::*};
21-
use cortex_m::asm;
2221

23-
// Test the defaults with no configuration
2422
#[init]
2523
fn init() -> super::State {
2624
let dp = unwrap!(pac::Peripherals::take());

testsuite/tests/gpio_output_push_pull.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
use defmt_rtt as _;
55
use panic_probe as _;
66

7+
use hal::prelude::*;
78
use stm32f3xx_hal as hal;
89

910
use hal::gpio::{Input, Output, PXx, PushPull};
@@ -15,13 +16,12 @@ struct State {
1516

1617
#[defmt_test::tests]
1718
mod tests {
19+
use super::*;
1820
use defmt::{assert, unwrap};
19-
use stm32f3xx_hal::{pac, prelude::*};
2021

21-
// Test the defaults with no configuration
2222
#[init]
2323
fn init() -> super::State {
24-
let dp = unwrap!(pac::Peripherals::take());
24+
let dp = unwrap!(hal::pac::Peripherals::take());
2525

2626
let mut rcc = dp.RCC.constrain();
2727
let mut gpioc = dp.GPIOC.split(&mut rcc.ahb);

0 commit comments

Comments
 (0)