From 76cf14c520091d00985f845203580e14c611ed14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Thu, 27 Aug 2020 11:21:56 +0000 Subject: Brutally yank out multicore --- macros/src/analyze.rs | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'macros/src/analyze.rs') diff --git a/macros/src/analyze.rs b/macros/src/analyze.rs index af6811f..c81c186 100644 --- a/macros/src/analyze.rs +++ b/macros/src/analyze.rs @@ -4,14 +4,14 @@ use std::collections::{BTreeMap, BTreeSet}; use rtic_syntax::{ analyze::{self, Priority}, ast::App, - Core, P, + P, }; use syn::Ident; /// Extend the upstream `Analysis` struct with our field pub struct Analysis { parent: P, - pub interrupts: BTreeMap>, + pub interrupts: BTreeMap, } impl ops::Deref for Analysis { @@ -25,32 +25,24 @@ impl ops::Deref for Analysis { // Assign an `extern` interrupt to each priority level pub fn app(analysis: P, app: &App) -> P { let mut interrupts = BTreeMap::new(); - for core in 0..app.args.cores { let priorities = app .software_tasks .values() .filter_map(|task| { - if task.args.core == core { Some(task.args.priority) - } else { - None - } }) - .chain(analysis.timer_queues.get(&core).map(|tq| tq.priority)) + .chain(analysis.timer_queues.first().map(|tq| tq.priority)) .collect::>(); if !priorities.is_empty() { - interrupts.insert( - core, + interrupts = priorities .iter() .cloned() .rev() - .zip(app.extern_interrupts[&core].keys().cloned()) - .collect(), - ); + .zip(app.extern_interrupts.keys().cloned()) + .collect(); } - } P::new(Analysis { parent: analysis, -- cgit v1.2.3