mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-12-17 23:49:35 +01:00
Merge #481
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:
commit
a320cacb29
2 changed files with 9 additions and 0 deletions
|
@ -7,11 +7,15 @@
|
|||
|
||||
use panic_semihosting as _;
|
||||
|
||||
pub struct SomeStruct;
|
||||
|
||||
#[rtic::app(device = lm3s6965, dispatchers = [SSI0])]
|
||||
mod app {
|
||||
use dwt_systick_monotonic::DwtSystick;
|
||||
use rtic::time::duration::Seconds;
|
||||
|
||||
use super::SomeStruct;
|
||||
|
||||
#[monotonic(binds = SysTick, default = true)]
|
||||
type MyMono = DwtSystick<8_000_000>; // 8 MHz
|
||||
|
||||
|
|
|
@ -163,6 +163,11 @@ pub fn app(app: &App, analysis: &Analysis, extra: &Extra) -> TokenStream2 {
|
|||
|
||||
/// Holds static methods for each monotonic.
|
||||
pub mod monotonics {
|
||||
#(
|
||||
#[allow(unused_imports)]
|
||||
#user_imports
|
||||
)*
|
||||
|
||||
#(#monotonic_parts)*
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue