Skip to content

Commit 0f79eae

Browse files
committed
Solved make prepush errors
1 parent 669100e commit 0f79eae

3 files changed

Lines changed: 7 additions & 24 deletions

File tree

chips/stm32u5xx/src/gpio.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,12 @@ register_structs! {
3737
}
3838
}
3939

40-
pub const GPIO_A_BASE: StaticRef<GpioRegisters> =
40+
pub const GPIO_A_BASE: StaticRef<GpioRegisters> =
4141
unsafe { StaticRef::new(0x52020000 as *const GpioRegisters) };
4242

43-
pub const GPIO_C_BASE: StaticRef<GpioRegisters> =
43+
pub const GPIO_C_BASE: StaticRef<GpioRegisters> =
4444
unsafe { StaticRef::new(0x52020800 as *const GpioRegisters) };
4545

46-
4746
#[derive(Copy, Clone, PartialEq)]
4847
pub enum PinId {
4948
Pin00 = 0,

chips/stm32u5xx/src/lib.rs

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -66,30 +66,15 @@ pub struct Stm32u5xxPeripherals<'a> {
6666
}
6767

6868
impl<'a> Stm32u5xxPeripherals<'a> {
69-
pub fn new(
70-
exti: &'a exti::Exti<'a>,
71-
dma1: &'a dma::Dma,
72-
usart1: &'a usart::Usart<'a>,
73-
) -> Self {
69+
pub fn new(exti: &'a exti::Exti<'a>, dma1: &'a dma::Dma, usart1: &'a usart::Usart<'a>) -> Self {
7470
Self {
7571
rcc: rcc::Rcc::new(rcc::RCC_BASE),
7672
exti,
7773
dma1,
78-
gpio_a: gpio::Port::new(
79-
gpio::GPIO_A_BASE,
80-
exti,
81-
gpio::GpioPort::PortA,
82-
),
83-
gpio_c: gpio::Port::new(
84-
gpio::GPIO_C_BASE,
85-
exti,
86-
gpio::GpioPort::PortC,
87-
),
74+
gpio_a: gpio::Port::new(gpio::GPIO_A_BASE, exti, gpio::GpioPort::PortA),
75+
gpio_c: gpio::Port::new(gpio::GPIO_C_BASE, exti, gpio::GpioPort::PortC),
8876
usart1,
89-
tim2: tim::Tim2::new(
90-
tim::TIM2_BASE,
91-
enable_tim2_clock,
92-
),
77+
tim2: tim::Tim2::new(tim::TIM2_BASE, enable_tim2_clock),
9378
}
9479
}
9580
}

chips/stm32u5xx/src/tim.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@ register_structs! {
3535
}
3636
}
3737

38-
pub const TIM2_BASE: StaticRef<TimRegisters> =
38+
pub const TIM2_BASE: StaticRef<TimRegisters> =
3939
unsafe { StaticRef::new(0x50000000 as *const TimRegisters) };
4040

41-
4241
register_bitfields![u32,
4342
pub CR1 [
4443
/// Counter enable

0 commit comments

Comments
 (0)