From bc3eb5c54784c32ccfff404dba58a27d5a47f04e Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Mon, 16 Aug 2021 15:37:39 +0200 Subject: Remove linked list impl - use heapless, linked list init now const fn --- macros/src/codegen/timer_queue.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'macros/src/codegen/timer_queue.rs') diff --git a/macros/src/codegen/timer_queue.rs b/macros/src/codegen/timer_queue.rs index abddbadc..bf896ee6 100644 --- a/macros/src/codegen/timer_queue.rs +++ b/macros/src/codegen/timer_queue.rs @@ -62,21 +62,20 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec>); + let n = util::capacity_literal(cap); + let tq_ty = quote!(rtic::export::TimerQueue<#mono_type, #t, #n>); // For future use // let doc = format!(" RTIC internal: {}:{}", file!(), line!()); items.push(quote!( #[doc(hidden)] static #tq: rtic::RacyCell<#tq_ty> = - rtic::RacyCell::new(core::mem::MaybeUninit::uninit()); + rtic::RacyCell::new(rtic::export::TimerQueue(rtic::export::SortedLinkedList::new_u16())); )); let mono = util::monotonic_ident(&monotonic_name); @@ -138,7 +137,7 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec