mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-27 14:04:56 +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" {
|
let (enable_interrupt, pend) = if &*m_isr.to_string() == "SysTick" {
|
||||||
(
|
(
|
||||||
quote!(core::mem::transmute::<_, cortex_m::peripheral::SYST>(())
|
quote!(core::mem::transmute::<_, rtic::export::SYST>(()).enable_interrupt()),
|
||||||
.enable_interrupt()),
|
|
||||||
quote!(rtic::export::SCB::set_pendst()),
|
quote!(rtic::export::SCB::set_pendst()),
|
||||||
)
|
)
|
||||||
} else {
|
} 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
|
// Always enable monotonic interrupts if they should never be off
|
||||||
if !<#mono_type as rtic::Monotonic>::DISABLE_INTERRUPT_ON_EMPTY_QUEUE {
|
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();
|
.enable_interrupt();
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
|
|
|
@ -127,7 +127,7 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
|
||||||
|
|
||||||
let bound_interrupt = &monotonic.args.binds;
|
let bound_interrupt = &monotonic.args.binds;
|
||||||
let disable_isr = if &*bound_interrupt.to_string() == "SysTick" {
|
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 {
|
} else {
|
||||||
quote!(rtic::export::NVIC::mask(#rt_err::#enum_::#bound_interrupt))
|
quote!(rtic::export::NVIC::mask(#rt_err::#enum_::#bound_interrupt))
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,7 +8,7 @@ pub use bare_metal::CriticalSection;
|
||||||
pub use cortex_m::{
|
pub use cortex_m::{
|
||||||
asm::wfi,
|
asm::wfi,
|
||||||
interrupt,
|
interrupt,
|
||||||
peripheral::{scb::SystemHandler, DWT, NVIC, SCB},
|
peripheral::{scb::SystemHandler, DWT, NVIC, SCB, SYST},
|
||||||
Peripherals,
|
Peripherals,
|
||||||
};
|
};
|
||||||
pub use heapless::sorted_linked_list::SortedLinkedList;
|
pub use heapless::sorted_linked_list::SortedLinkedList;
|
||||||
|
|
Loading…
Reference in a new issue