This commit is contained in:
ivmarkov 2024-07-09 06:26:56 +00:00
parent fc1b0650d9
commit 92d846ec56

View File

@ -524,7 +524,10 @@ impl<'d> PcntDriver<'d> {
let callback: alloc::boxed::Box<dyn FnMut(u32) + 'd> = alloc::boxed::Box::new(callback);
unsafe {
ISR_HANDLERS[self.unit as usize] = Some(core::mem::transmute(callback));
ISR_HANDLERS[self.unit as usize] = Some(core::mem::transmute::<
alloc::boxed::Box<dyn core::ops::FnMut(u32)>,
IsrHandler,
>(callback));
}
esp!(unsafe {
pcnt_isr_handler_add(