mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-12-01 16:04:33 +01:00
Fix export of SYST
This commit is contained in:
parent
5e5a4c117c
commit
7c6588e6bd
4 changed files with 4 additions and 5 deletions
|
@ -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 {
|
||||
|
|
|
@ -104,7 +104,7 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec<TokenStream
|
|||
|
||||
// Always enable monotonic interrupts if they should never be off
|
||||
if !<#mono_type as rtic::Monotonic>::DISABLE_INTERRUPT_ON_EMPTY_QUEUE {
|
||||
core::mem::transmute::<_, cortex_m::peripheral::SYST>(())
|
||||
core::mem::transmute::<_, rtic::export::SYST>(())
|
||||
.enable_interrupt();
|
||||
}
|
||||
));
|
||||
|
|
|
@ -127,7 +127,7 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
|
|||
|
||||
let bound_interrupt = &monotonic.args.binds;
|
||||
let disable_isr = if &*bound_interrupt.to_string() == "SysTick" {
|
||||
quote!(core::mem::transmute::<_, cortex_m::peripheral::SYST>(()).disable_interrupt())
|
||||
quote!(core::mem::transmute::<_, rtic::export::SYST>(()).disable_interrupt())
|
||||
} else {
|
||||
quote!(rtic::export::NVIC::mask(#rt_err::#enum_::#bound_interrupt))
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue