use super::xx now works with monotonics

This commit is contained in:
Emil Fresk 2021-04-22 17:39:07 +02:00
parent e6a22aa48e
commit 6fc7b96474
2 changed files with 9 additions and 0 deletions

View file

@ -7,11 +7,15 @@
use panic_semihosting as _; use panic_semihosting as _;
pub struct SomeStruct;
#[rtic::app(device = lm3s6965, dispatchers = [SSI0])] #[rtic::app(device = lm3s6965, dispatchers = [SSI0])]
mod app { mod app {
use dwt_systick_monotonic::DwtSystick; use dwt_systick_monotonic::DwtSystick;
use rtic::time::duration::Seconds; use rtic::time::duration::Seconds;
use super::SomeStruct;
#[monotonic(binds = SysTick, default = true)] #[monotonic(binds = SysTick, default = true)]
type MyMono = DwtSystick<8_000_000>; // 8 MHz type MyMono = DwtSystick<8_000_000>; // 8 MHz

View file

@ -163,6 +163,11 @@ pub fn app(app: &App, analysis: &Analysis, extra: &Extra) -> TokenStream2 {
/// Holds static methods for each monotonic. /// Holds static methods for each monotonic.
pub mod monotonics { pub mod monotonics {
#(
#[allow(unused_imports)]
#user_imports
)*
#(#monotonic_parts)* #(#monotonic_parts)*
} }
) )