Skip to content

Commit

Permalink
Fix the no_std build
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmarkov committed Oct 9, 2023
1 parent a7aaba9 commit 071d7c6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,14 +305,17 @@ impl<'d> TimerDriver<'d> {
}
}

#[cfg(feature = "alloc")]
unsafe extern "C" fn handle_isr(index: *mut core::ffi::c_void) -> bool {
use core::num::NonZeroU32;

let index = index as usize;

crate::interrupt::with_isr_yield_signal(move || {
if let Some(handler) = ISR_HANDLERS[index].as_mut() {
handler();
#[cfg(feature = "alloc")]
{
if let Some(handler) = ISR_HANDLERS[index].as_mut() {
handler();
}
}

PIN_NOTIF[index].notify(NonZeroU32::new(1).unwrap());
Expand Down

0 comments on commit 071d7c6

Please sign in to comment.