mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-12-24 02:49:34 +01:00
pass P0 to init, derive GreaterThanOrEqual for U0
This commit is contained in:
parent
398a5ebc5c
commit
bf17ee7422
2 changed files with 6 additions and 4 deletions
4
build.rs
4
build.rs
|
@ -76,8 +76,8 @@ fn main() {
|
|||
}
|
||||
|
||||
// GreaterThanOrEqual
|
||||
for i in 1..(1 << bits) + 1 {
|
||||
for j in 1..(i + 1) {
|
||||
for i in 0..(1 << bits) + 1 {
|
||||
for j in 0..(i + 1) {
|
||||
let i = Ident::new(format!("U{}", i));
|
||||
let j = Ident::new(format!("U{}", j));
|
||||
|
||||
|
|
|
@ -364,12 +364,14 @@ macro_rules! tasks {
|
|||
}) => {
|
||||
fn main() {
|
||||
$crate::critical(|cmax| {
|
||||
init(cmax);
|
||||
let p0 = unsafe { ::core::ptr::read(0x0 as *const P0) };
|
||||
init(p0, cmax);
|
||||
set_priorities();
|
||||
enable_tasks();
|
||||
});
|
||||
|
||||
idle(unsafe { ::core::ptr::read(0x0 as *const P0) });
|
||||
let p0 = unsafe { ::core::ptr::read(0x0 as *const P0) };
|
||||
idle(p0);
|
||||
|
||||
fn set_priorities() {
|
||||
// NOTE(safe) this function runs in an interrupt free context
|
||||
|
|
Loading…
Reference in a new issue