mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-29 15:04:32 +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) {
|
fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) {
|
||||||
let buffer: &'static mut [u8; 1024] = cx.local.buffer;
|
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) {
|
fn init(_: init::Context) -> (MySharedResources, MyLocalResources, init::Monotonics) {
|
||||||
rtic::pend(Interrupt::UART0);
|
rtic::pend(Interrupt::UART0);
|
||||||
|
|
||||||
(MySharedResources, MyLocalResources, init::Monotonics {})
|
(MySharedResources, MyLocalResources, init::Monotonics())
|
||||||
}
|
}
|
||||||
|
|
||||||
// [more code]
|
// [more code]
|
||||||
|
|
|
@ -16,6 +16,6 @@ mod app {
|
||||||
|
|
||||||
#[init]
|
#[init]
|
||||||
fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {
|
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) {
|
fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {
|
||||||
foo::spawn(1, 2).unwrap();
|
foo::spawn(1, 2).unwrap();
|
||||||
|
|
||||||
(Shared {}, Local {}, init::Monotonics {})
|
(Shared {}, Local {}, init::Monotonics())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[task()]
|
#[task()]
|
||||||
|
|
|
@ -21,7 +21,7 @@ mod app {
|
||||||
fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {
|
fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {
|
||||||
foo::spawn(1, 2).unwrap();
|
foo::spawn(1, 2).unwrap();
|
||||||
|
|
||||||
(Shared {}, Local {}, init::Monotonics {})
|
(Shared {}, Local {}, init::Monotonics())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[task]
|
#[task]
|
||||||
|
|
|
@ -18,7 +18,7 @@ fn analyze() {
|
||||||
|
|
||||||
#[init]
|
#[init]
|
||||||
fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {
|
fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {
|
||||||
(Shared {}, Local {}, init::Monotonics {})
|
(Shared {}, Local {}, init::Monotonics())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[task(priority = 1)]
|
#[task(priority = 1)]
|
||||||
|
|
|
@ -10,7 +10,7 @@ mod app {
|
||||||
|
|
||||||
#[init]
|
#[init]
|
||||||
fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) {
|
fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) {
|
||||||
(Shared {}, Local {}, init::Monotonics {})
|
(Shared {}, Local {}, init::Monotonics())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[task(binds = NonMaskableInt)]
|
#[task(binds = NonMaskableInt)]
|
||||||
|
|
|
@ -10,7 +10,7 @@ mod app {
|
||||||
|
|
||||||
#[init]
|
#[init]
|
||||||
fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) {
|
fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) {
|
||||||
(Shared {}, Local {}, init::Monotonics {})
|
(Shared {}, Local {}, init::Monotonics())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[task]
|
#[task]
|
||||||
|
|
|
@ -10,7 +10,7 @@ mod app {
|
||||||
|
|
||||||
#[init]
|
#[init]
|
||||||
fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) {
|
fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) {
|
||||||
(Shared {}, Local {}, init::Monotonics {})
|
(Shared {}, Local {}, init::Monotonics())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[task(binds = UART0)]
|
#[task(binds = UART0)]
|
||||||
|
|
|
@ -10,7 +10,7 @@ mod app {
|
||||||
|
|
||||||
#[init]
|
#[init]
|
||||||
fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) {
|
fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) {
|
||||||
(Shared {}, Local {}, init::Monotonics {})
|
(Shared {}, Local {}, init::Monotonics())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[task(binds = GPIOA, priority = 1)]
|
#[task(binds = GPIOA, priority = 1)]
|
||||||
|
|
Loading…
Reference in a new issue