diff options
author | 2021-02-04 20:22:02 +0100 | |
---|---|---|
committer | 2021-02-04 20:22:02 +0100 | |
commit | 6fb43fa97be75f00553e0026ac06f107ee832dc2 (patch) | |
tree | 5219f673178999295e8738d0f8f7e1623a5a0bb9 /macros/src/codegen/module.rs | |
parent | 0658d53843d5452085e7458269e0abebbf431971 (diff) | |
download | rtic-6fb43fa97be75f00553e0026ac06f107ee832dc2.tar.gz rtic-6fb43fa97be75f00553e0026ac06f107ee832dc2.tar.zst rtic-6fb43fa97be75f00553e0026ac06f107ee832dc2.zip |
Minor fixes
Diffstat (limited to 'macros/src/codegen/module.rs')
-rw-r--r-- | macros/src/codegen/module.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/macros/src/codegen/module.rs b/macros/src/codegen/module.rs index d15b5eca..93fbeaef 100644 --- a/macros/src/codegen/module.rs +++ b/macros/src/codegen/module.rs @@ -135,7 +135,7 @@ pub fn codegen( /// Monotonics used by the system #[allow(non_snake_case)] pub struct Monotonics( - #(#monotonic_types),* + #(pub #monotonic_types),* ); )); } @@ -258,10 +258,13 @@ pub fn codegen( items.push(quote!( pub mod #m { #(#cfgs)* - pub fn spawn_after( - duration: rtic::time::duration::Duration, + pub fn spawn_after<D>( + duration: D, #(,#args)* - ) -> Result<(), #ty> { + ) -> Result<(), #ty> + where D: rtic::time::duration::Duration + rtic::time::fixed_point::FixedPoint, + D::T: Into<<#app_path::#m as rtic::time::Clock>::T>, + { let instant = <#app_path::#m as rtic::Monotonic>::now(); spawn_at(instant + duration, #(,#untupled)*) |