mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-23 20:22:51 +01:00
Merge #538
538: Fix export of SYST r=AfoHT a=korken89 Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
This commit is contained in:
commit
0dd97d722e
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