Skip to content

Commit 6ca838e

Browse files
committed
fmt
1 parent 239880d commit 6ca838e

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

src/hrtim/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ use core::mem::MaybeUninit;
88
use crate::{
99
gpio,
1010
rcc::{Enable, Reset},
11-
stm32::{
12-
HRTIM_COMMON, HRTIM_TIMA, HRTIM_TIMB, HRTIM_TIMC, HRTIM_TIMD, HRTIM_TIME, HRTIM_TIMF,
13-
},
11+
stm32::{HRTIM_COMMON, HRTIM_TIMA, HRTIM_TIMB, HRTIM_TIMC, HRTIM_TIMD, HRTIM_TIME, HRTIM_TIMF},
1412
};
1513
use stm32_hrtim::{
1614
control::{HrPwmControl, HrTimOngoingCalibration},

tests/common/mod.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,14 @@ pub fn await_p<const CYCLES_PER_US: u32>(
6767
}
6868

6969
#[allow(dead_code)]
70-
pub fn test_pwm<const CYCLES_PER_US: u32>(timer: &Timer<CYCLES_PER_US>, pin_num: u8, t_lo: MicrosDurationU32, t_hi: MicrosDurationU32, t_max_deviation: MicrosDurationU32, first_start_mult: u32) {
70+
pub fn test_pwm<const CYCLES_PER_US: u32>(
71+
timer: &Timer<CYCLES_PER_US>,
72+
pin_num: u8,
73+
t_lo: MicrosDurationU32,
74+
t_hi: MicrosDurationU32,
75+
t_max_deviation: MicrosDurationU32,
76+
first_start_mult: u32,
77+
) {
7178
defmt::debug!("Awaiting first rising edge...");
7279

7380
let t_lo_min = t_lo - t_max_deviation;
@@ -113,4 +120,4 @@ pub fn test_pwm<const CYCLES_PER_US: u32>(timer: &Timer<CYCLES_PER_US>, pin_num:
113120
defmt::debug!("Low half period: {}", lo_duration);
114121

115122
defmt::debug!("Done!");
116-
}
123+
}

tests/nucleo-g474_hrtim.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,10 @@ fn setup<P: stm32g4xx_hal::hrtim::HrtimPin<stm32::HRTIM_TIMA>>(
124124
hrtim_tima: stm32::HRTIM_TIMA,
125125
hrtim_common: stm32::HRTIM_COMMON,
126126
rcc: &mut Rcc,
127-
) -> (HrParts<stm32::HRTIM_TIMA, Pscl64, P::Out<Pscl64>>, HrPwmControl) {
127+
) -> (
128+
HrParts<stm32::HRTIM_TIMA, Pscl64, P::Out<Pscl64>>,
129+
HrPwmControl,
130+
) {
128131
use stm32g4xx_hal::hrtim::HrPwmBuilderExt;
129132
let (hr_control, ..) = hrtim_common.hr_control(rcc).wait_for_calibration();
130133
let mut hr_control = hr_control.constrain();

0 commit comments

Comments
 (0)