mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2025-04-29 09:24:44 +00:00
update rtic extension output
This commit is contained in:
parent
6d084d0ef7
commit
4a31b115af
1 changed files with 7 additions and 1 deletions
|
@ -16,6 +16,12 @@ You can use `rustfmt` on `target/rtic-expansion.rs` to make the generated code e
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
unsafe extern "C" fn main() -> ! {
|
unsafe extern "C" fn main() -> ! {
|
||||||
|
const _CONST_CHECK: () = {
|
||||||
|
if rtic::export::is_armv6() {
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
let _ = _CONST_CHECK;
|
||||||
rtic::export::interrupt::disable();
|
rtic::export::interrupt::disable();
|
||||||
let mut core: rtic::export::Peripherals = rtic::export::Peripherals::steal().into();
|
let mut core: rtic::export::Peripherals = rtic::export::Peripherals::steal().into();
|
||||||
#[inline(never)]
|
#[inline(never)]
|
||||||
|
@ -29,7 +35,7 @@ unsafe extern "C" fn main() -> ! {
|
||||||
let (shared_resources, local_resources, mut monotonics) =
|
let (shared_resources, local_resources, mut monotonics) =
|
||||||
init(init::Context::new(core.into()));
|
init(init::Context::new(core.into()));
|
||||||
rtic::export::interrupt::enable();
|
rtic::export::interrupt::enable();
|
||||||
});
|
});
|
||||||
idle(idle::Context::new(&rtic::export::Priority::new(0)))
|
idle(idle::Context::new(&rtic::export::Priority::new(0)))
|
||||||
}
|
}
|
||||||
```
|
```
|
Loading…
Reference in a new issue