-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
51: Resource handling take 2 implementation r=korken89 a=korken89 See rtic-rs/rfcs#46 for design Co-authored-by: Emil Fresk <[email protected]>
- Loading branch information
Showing
161 changed files
with
1,415 additions
and
1,194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
//! Full syntax | ||
|
||
#[mock::app(parse_binds, | ||
dispatchers = [ | ||
#[link_section = ".data.UART1"] | ||
A, | ||
#[link_section = ".data.UART2"] | ||
B | ||
]) | ||
] | ||
mod app { | ||
#[shared] | ||
struct Shared { | ||
a: u32, | ||
b: u32, | ||
c: u32, | ||
d: u32, | ||
} | ||
|
||
#[local] | ||
struct Local { | ||
a: u32, | ||
b: u32, | ||
c: u32, | ||
d: u32, | ||
} | ||
|
||
#[init] | ||
fn init(_: init::Context) -> (Shared, Local, init::Monotonics) { | ||
init::LateResources {} | ||
} | ||
|
||
#[idle] | ||
fn idle(_: idle::Context) -> ! { | ||
loop {} | ||
} | ||
|
||
#[task] | ||
fn t1(_: t1::Context) {} | ||
|
||
#[task(local = [ | ||
#[testing1] | ||
#[testing2] | ||
#[link_section = ".example_section"] | ||
q: (u32, core::u8) = (4, 3), | ||
])] | ||
fn t2(_: t2::Context) {} | ||
|
||
#[task(local = [ohno: u32 = 0])] | ||
fn t3(_: t3::Context) {} | ||
|
||
#[task(local = [ohno: u32 = 0])] | ||
fn t4(_: t4::Context) {} | ||
} |
Oops, something went wrong.