diff --git a/macros/src/codegen/module.rs b/macros/src/codegen/module.rs index 6011c9bc04..5e0827ca9d 100644 --- a/macros/src/codegen/module.rs +++ b/macros/src/codegen/module.rs @@ -274,8 +274,7 @@ pub fn codegen( let (enable_interrupt, pend) = if &*m_isr.to_string() == "SysTick" { ( - quote!(core::mem::transmute::<_, cortex_m::peripheral::SYST>(()) - .enable_interrupt()), + quote!(core::mem::transmute::<_, rtic::export::SYST>(()).enable_interrupt()), quote!(rtic::export::SCB::set_pendst()), ) } else { diff --git a/macros/src/codegen/pre_init.rs b/macros/src/codegen/pre_init.rs index eb216d8657..3017c08e3d 100644 --- a/macros/src/codegen/pre_init.rs +++ b/macros/src/codegen/pre_init.rs @@ -104,7 +104,7 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec::DISABLE_INTERRUPT_ON_EMPTY_QUEUE { - core::mem::transmute::<_, cortex_m::peripheral::SYST>(()) + core::mem::transmute::<_, rtic::export::SYST>(()) .enable_interrupt(); } )); diff --git a/macros/src/codegen/timer_queue.rs b/macros/src/codegen/timer_queue.rs index fdfa6381a7..896b3a83f6 100644 --- a/macros/src/codegen/timer_queue.rs +++ b/macros/src/codegen/timer_queue.rs @@ -127,7 +127,7 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec(()).disable_interrupt()) + quote!(core::mem::transmute::<_, rtic::export::SYST>(()).disable_interrupt()) } else { quote!(rtic::export::NVIC::mask(#rt_err::#enum_::#bound_interrupt)) }; diff --git a/src/export.rs b/src/export.rs index 8fdcb67ef8..48a7d06ec4 100644 --- a/src/export.rs +++ b/src/export.rs @@ -8,7 +8,7 @@ pub use bare_metal::CriticalSection; pub use cortex_m::{ asm::wfi, interrupt, - peripheral::{scb::SystemHandler, DWT, NVIC, SCB}, + peripheral::{scb::SystemHandler, DWT, NVIC, SCB, SYST}, Peripherals, }; pub use heapless::sorted_linked_list::SortedLinkedList;