aboutsummaryrefslogtreecommitdiff
path: root/macros/src/codegen/timer_queue.rs
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge@japaric.io> 2019-06-18 10:31:31 +0200
committerGravatar Jorge Aparicio <jorge@japaric.io> 2019-06-18 10:31:31 +0200
commit9897728709528a02545523bea72576abce89dc4c (patch)
tree49619bfb8e3e09cccbc9c2bd1854abfe1618c8fd /macros/src/codegen/timer_queue.rs
parent81275bfa4f41e2066770087f3a33cad4227eab41 (diff)
downloadrtic-9897728709528a02545523bea72576abce89dc4c.tar.gz
rtic-9897728709528a02545523bea72576abce89dc4c.tar.zst
rtic-9897728709528a02545523bea72576abce89dc4c.zip
add homogeneous multi-core support
Diffstat (limited to 'macros/src/codegen/timer_queue.rs')
-rw-r--r--macros/src/codegen/timer_queue.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/macros/src/codegen/timer_queue.rs b/macros/src/codegen/timer_queue.rs
index cb845774..d306ed5b 100644
--- a/macros/src/codegen/timer_queue.rs
+++ b/macros/src/codegen/timer_queue.rs
@@ -89,15 +89,16 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec<TokenStream
let receiver = task.args.core;
let rq = util::rq_ident(receiver, priority, sender);
let rqt = util::spawn_t_ident(receiver, priority, sender);
+ let enum_ = util::interrupt_ident(receiver, app.args.cores);
let interrupt = &analysis.interrupts[&receiver][&priority];
let pend = if sender != receiver {
quote!(
- #device::xpend(#receiver, #device::Interrupt::#interrupt);
+ #device::xpend(#receiver, #device::#enum_::#interrupt);
)
} else {
quote!(
- rtfm::pend(#device::Interrupt::#interrupt);
+ rtfm::pend(#device::#enum_::#interrupt);
)
};
@@ -115,10 +116,11 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec<TokenStream
.collect::<Vec<_>>();
let priority = timer_queue.priority;
+ let sys_tick = util::suffixed("SysTick", sender);
items.push(quote!(
#cfg_sender
#[no_mangle]
- unsafe fn SysTick() {
+ unsafe fn #sys_tick() {
use rtfm::Mutex as _;
/// The priority of this handler