Skip to content

Commit

Permalink
Rename timer handler
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Feb 21, 2025
1 parent 7fece5b commit c8c35e2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions esp-wifi/src/preempt_builtin/timer/xtensa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ pub(crate) fn setup_timer(mut timer1: TimeBase) {
// The timer needs to tick at Priority 1 to prevent accidentally interrupting
// priority 1 limited locks.
timer1.set_interrupt_handler(InterruptHandler::new(
unsafe { core::mem::transmute::<*const (), extern "C" fn()>(handler as *const ()) },
unsafe {
core::mem::transmute::<*const (), extern "C" fn()>(timer_tick_handler as *const ())
},
interrupt::Priority::Priority1,
));
unwrap!(timer1.start(TIMESLICE_FREQUENCY.as_duration()));
Expand Down Expand Up @@ -54,7 +56,7 @@ pub(crate) fn disable_multitasking() {
xtensa_lx::interrupt::disable_mask(SW_INTERRUPT);
}

extern "C" fn handler() {
extern "C" fn timer_tick_handler() {
TIMER.with(|timer| {
let timer = unwrap!(timer.as_mut());
timer.clear_interrupt();
Expand Down

0 comments on commit c8c35e2

Please sign in to comment.