mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-27 14:04:56 +01:00
use super::xx now works with monotonics
This commit is contained in:
parent
e6a22aa48e
commit
6fc7b96474
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