mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-23 20:22:51 +01:00
use tuple struct syntax for Monotonics everywhere
This commit is contained in:
parent
5f7dc0b903
commit
18880406cb
9 changed files with 10 additions and 10 deletions
|
@ -226,7 +226,7 @@ v0.6.0 code:
|
|||
fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) {
|
||||
let buffer: &'static mut [u8; 1024] = cx.local.buffer;
|
||||
|
||||
(Shared {}, Local {}, init::Monotonics {})
|
||||
(Shared {}, Local {}, init::Monotonics())
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -263,7 +263,7 @@ mod app {
|
|||
fn init(_: init::Context) -> (MySharedResources, MyLocalResources, init::Monotonics) {
|
||||
rtic::pend(Interrupt::UART0);
|
||||
|
||||
(MySharedResources, MyLocalResources, init::Monotonics {})
|
||||
(MySharedResources, MyLocalResources, init::Monotonics())
|
||||
}
|
||||
|
||||
// [more code]
|
||||
|
|
|
@ -16,6 +16,6 @@ mod app {
|
|||
|
||||
#[init]
|
||||
fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {
|
||||
(Shared {}, Local {}, init::Monotonics {})
|
||||
(Shared {}, Local {}, init::Monotonics())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ mod app {
|
|||
fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {
|
||||
foo::spawn(1, 2).unwrap();
|
||||
|
||||
(Shared {}, Local {}, init::Monotonics {})
|
||||
(Shared {}, Local {}, init::Monotonics())
|
||||
}
|
||||
|
||||
#[task()]
|
||||
|
|
|
@ -21,7 +21,7 @@ mod app {
|
|||
fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {
|
||||
foo::spawn(1, 2).unwrap();
|
||||
|
||||
(Shared {}, Local {}, init::Monotonics {})
|
||||
(Shared {}, Local {}, init::Monotonics())
|
||||
}
|
||||
|
||||
#[task]
|
||||
|
|
|
@ -18,7 +18,7 @@ fn analyze() {
|
|||
|
||||
#[init]
|
||||
fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {
|
||||
(Shared {}, Local {}, init::Monotonics {})
|
||||
(Shared {}, Local {}, init::Monotonics())
|
||||
}
|
||||
|
||||
#[task(priority = 1)]
|
||||
|
|
|
@ -10,7 +10,7 @@ mod app {
|
|||
|
||||
#[init]
|
||||
fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) {
|
||||
(Shared {}, Local {}, init::Monotonics {})
|
||||
(Shared {}, Local {}, init::Monotonics())
|
||||
}
|
||||
|
||||
#[task(binds = NonMaskableInt)]
|
||||
|
|
|
@ -10,7 +10,7 @@ mod app {
|
|||
|
||||
#[init]
|
||||
fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) {
|
||||
(Shared {}, Local {}, init::Monotonics {})
|
||||
(Shared {}, Local {}, init::Monotonics())
|
||||
}
|
||||
|
||||
#[task]
|
||||
|
|
|
@ -10,7 +10,7 @@ mod app {
|
|||
|
||||
#[init]
|
||||
fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) {
|
||||
(Shared {}, Local {}, init::Monotonics {})
|
||||
(Shared {}, Local {}, init::Monotonics())
|
||||
}
|
||||
|
||||
#[task(binds = UART0)]
|
||||
|
|
|
@ -10,7 +10,7 @@ mod app {
|
|||
|
||||
#[init]
|
||||
fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) {
|
||||
(Shared {}, Local {}, init::Monotonics {})
|
||||
(Shared {}, Local {}, init::Monotonics())
|
||||
}
|
||||
|
||||
#[task(binds = GPIOA, priority = 1)]
|
||||
|
|
Loading…
Reference in a new issue