538: Fix export of SYST r=AfoHT a=korken89



Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
This commit is contained in:
bors[bot] 2021-09-28 08:40:21 +00:00 committed by GitHub
commit 0dd97d722e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 5 deletions

View file

@ -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 {

View file

@ -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();
} }
)); ));

View file

@ -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))
}; };

View file

@ -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;