Skip to content

Commit

Permalink
fix things
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominic Fischer committed Aug 8, 2024
1 parent 51ecfec commit 7b7457d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion esp-hal/src/timer/systimer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ mod asynch {
}

impl<'a, const COMP: u8, const UNIT: u8> AlarmFuture<'a, COMP, UNIT> {
pub(crate) fn new(alarm: &'a Alarm<Periodic, crate::Async, COMP, UNIT>) -> Self {
pub(crate) fn new(alarm: &'a Alarm<'a, Periodic, crate::Async, COMP, UNIT>) -> Self {
alarm.clear_interrupt();

let (interrupt, handler) = match COMP {
Expand Down
12 changes: 6 additions & 6 deletions hil-test/tests/embassy_timers_executors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ mod test_helpers {
let system = SystemControl::new(peripherals.SYSTEM);
let clocks = ClockControl::boot_defaults(system.clock_control).freeze();

let systimer = SystemTimer::new(peripherals.SYSTIMER);
let systimer = SystemTimer::new(peripherals.SYSTIMER).split();
let alarm0: ErasedTimer = systimer.alarm0.into();
let timers = [OneShotTimer::new(alarm0)];
let timers = mk_static!([OneShotTimer<ErasedTimer>; 1], timers);
Expand Down Expand Up @@ -189,7 +189,7 @@ mod test_helpers {
let system = SystemControl::new(peripherals.SYSTEM);
let clocks = ClockControl::boot_defaults(system.clock_control).freeze();

let systimer = SystemTimer::new(peripherals.SYSTIMER);
let systimer = SystemTimer::new(peripherals.SYSTIMER).split();
let alarm0: ErasedTimer = systimer.alarm0.into();
let timers = [OneShotTimer::new(alarm0)];
let timers = mk_static!([OneShotTimer<ErasedTimer>; 1], timers);
Expand Down Expand Up @@ -322,7 +322,7 @@ mod test {
fn run_test_periodic_systimer() {
let peripherals = Peripherals::take();

let systimer = SystemTimer::new(peripherals.SYSTIMER);
let systimer = SystemTimer::new(peripherals.SYSTIMER).split();

let mut periodic = PeriodicTimer::new(systimer.alarm0);

Expand Down Expand Up @@ -382,7 +382,7 @@ mod test {
fn run_test_periodic_oneshot_systimer() {
let mut peripherals = Peripherals::take();

let mut systimer = SystemTimer::new(&mut peripherals.SYSTIMER);
let mut systimer = SystemTimer::new(&mut peripherals.SYSTIMER).split();

let mut periodic = PeriodicTimer::new(&mut systimer.alarm0);

Expand All @@ -400,7 +400,7 @@ mod test {

core::mem::drop(periodic);

let systimer = SystemTimer::new(&mut peripherals.SYSTIMER);
let systimer = SystemTimer::new(&mut peripherals.SYSTIMER).split();

let timer0 = OneShotTimer::new(systimer.alarm0);

Expand Down Expand Up @@ -448,7 +448,7 @@ mod test {
let timer0 = OneShotTimer::new(timer0);

let timer1 = {
let systimer = esp_hal::timer::systimer::SystemTimer::new(peripherals.SYSTIMER);
let systimer = esp_hal::timer::systimer::SystemTimer::new(peripherals.SYSTIMER).split();
let alarm0: ErasedTimer = systimer.alarm0.into();
OneShotTimer::new(alarm0)
};
Expand Down

0 comments on commit 7b7457d

Please sign in to comment.