From 35b4ec0d0435879cca97536b5c866fc2ac2e9210 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Sun, 13 Dec 2020 00:06:50 +0100 Subject: [PATCH] Reexport embedded-time as rtic::time --- macros/src/codegen/module.rs | 4 ++-- macros/src/codegen/software_tasks.rs | 2 +- src/lib.rs | 2 +- src/tq.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/macros/src/codegen/module.rs b/macros/src/codegen/module.rs index 0f495d9783..2b6042c8c8 100644 --- a/macros/src/codegen/module.rs +++ b/macros/src/codegen/module.rs @@ -250,7 +250,7 @@ pub fn codegen( pub mod #m { #(#cfgs)* pub fn spawn_after( - duration: rtic::Duration, + duration: rtic::time::duration::Duration, #(,#args)* ) -> Result<(), #ty> { let instant = <#app_path::#m as rtic::Monotonic>::now(); @@ -260,7 +260,7 @@ pub fn codegen( #(#cfgs)* pub fn spawn_at( - instant: rtic::Instant<#app_path::#m> + instant: rtic::time::Instant<#app_path::#m> #(,#args)* ) -> Result<(), #ty> { unsafe { diff --git a/macros/src/codegen/software_tasks.rs b/macros/src/codegen/software_tasks.rs index ebe7bdf48e..53de50b9f7 100644 --- a/macros/src/codegen/software_tasks.rs +++ b/macros/src/codegen/software_tasks.rs @@ -69,7 +69,7 @@ pub fn codegen( #uninit /// Buffer that holds the instants associated to the inputs of a task static mut #instants: - [core::mem::MaybeUninit>; #cap_lit] = + [core::mem::MaybeUninit>; #cap_lit] = [#(#elems,)*]; )); } diff --git a/src/lib.rs b/src/lib.rs index c85090fbd7..0840589156 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -38,7 +38,7 @@ use cortex_m::{interrupt::Nr, peripheral::NVIC}; pub use cortex_m_rtic_macros::app; pub use rtic_core::{ - monotonic::{self, Clock, Duration, Instant, Monotonic}, + monotonic::{self, embedded_time as time, Monotonic}, prelude as mutex_prelude, Exclusive, Mutex, }; diff --git a/src/tq.rs b/src/tq.rs index 2bfb651eee..a98eed6f0a 100644 --- a/src/tq.rs +++ b/src/tq.rs @@ -1,4 +1,4 @@ -use crate::{Instant, Monotonic}; +use crate::{time::Instant, Monotonic}; use core::cmp::Ordering; use heapless::{binary_heap::Min, ArrayLength, BinaryHeap};