mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-23 20:22:51 +01:00
export Cell removed, expmples updated
This commit is contained in:
parent
29228c4723
commit
6dc2d29cd9
3 changed files with 5 additions and 8 deletions
|
@ -18,10 +18,10 @@ mod app {
|
||||||
struct Local {}
|
struct Local {}
|
||||||
|
|
||||||
#[init]
|
#[init]
|
||||||
fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {
|
fn init(_: init::Context) -> (Shared, Local) {
|
||||||
hprintln!("init").unwrap();
|
hprintln!("init").unwrap();
|
||||||
|
|
||||||
(Shared {}, Local {}, init::Monotonics())
|
(Shared {}, Local {})
|
||||||
}
|
}
|
||||||
|
|
||||||
#[idle(local = [x: u32 = 0])]
|
#[idle(local = [x: u32 = 0])]
|
||||||
|
|
|
@ -18,7 +18,7 @@ mod app {
|
||||||
struct Local {}
|
struct Local {}
|
||||||
|
|
||||||
#[init(local = [x: u32 = 0])]
|
#[init(local = [x: u32 = 0])]
|
||||||
fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) {
|
fn init(cx: init::Context) -> (Shared, Local) {
|
||||||
// Cortex-M peripherals
|
// Cortex-M peripherals
|
||||||
let _core: cortex_m::Peripherals = cx.core;
|
let _core: cortex_m::Peripherals = cx.core;
|
||||||
|
|
||||||
|
@ -36,6 +36,6 @@ mod app {
|
||||||
|
|
||||||
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
|
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
|
||||||
|
|
||||||
(Shared {}, Local {}, init::Monotonics())
|
(Shared {}, Local {})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
pub use bare_metal::CriticalSection;
|
pub use bare_metal::CriticalSection;
|
||||||
use core::{
|
use core::sync::atomic::{AtomicBool, Ordering};
|
||||||
cell::Cell,
|
|
||||||
sync::atomic::{AtomicBool, Ordering},
|
|
||||||
};
|
|
||||||
pub use cortex_m::{
|
pub use cortex_m::{
|
||||||
asm::nop,
|
asm::nop,
|
||||||
asm::wfi,
|
asm::wfi,
|
||||||
|
|
Loading…
Reference in a new issue