481: use super::xx now works with monotonics r=AfoHT a=korken89



Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
This commit is contained in:
bors[bot] 2021-04-22 15:54:17 +00:00 committed by GitHub
commit a320cacb29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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)*
} }
) )