mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-18 13:55:23 +01:00
update examples and tests
This commit is contained in:
parent
88599780e0
commit
89c922079e
10 changed files with 23 additions and 17 deletions
|
|
@ -11,7 +11,7 @@ use rtfm::app;
|
|||
const APP: () = {
|
||||
#[init]
|
||||
fn init() -> ! {
|
||||
//~^ ERROR `init` must have type signature `[unsafe] fn()`
|
||||
//~^ ERROR `init` must have type signature `[unsafe] fn() [-> init::LateResources]`
|
||||
loop {}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -11,6 +11,6 @@ use rtfm::app;
|
|||
const APP: () = {
|
||||
#[init]
|
||||
fn init(undef: u32) {
|
||||
//~^ ERROR `init` must have type signature `[unsafe] fn()`
|
||||
//~^ ERROR `init` must have type signature `[unsafe] fn() [-> init::LateResources]`
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ use rtfm::app;
|
|||
const APP: () = {
|
||||
#[init]
|
||||
fn init() -> u32 {
|
||||
//~^ ERROR `init` must have type signature `[unsafe] fn()`
|
||||
//~^ ERROR `init` must have type signature `[unsafe] fn() [-> init::LateResources]`
|
||||
0
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,8 +22,10 @@ const APP: () = {
|
|||
static mut X: NotSend = ();
|
||||
|
||||
#[init]
|
||||
fn init() {
|
||||
X = NotSend { _0: PhantomData };
|
||||
fn init() -> init::LateResources {
|
||||
init::LateResources {
|
||||
X: NotSend { _0: PhantomData },
|
||||
}
|
||||
}
|
||||
|
||||
#[interrupt(resources = [X])]
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
// TODO remove in v0.5.x
|
||||
|
||||
#![no_main]
|
||||
#![no_std]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue