diff options
| author | Jorge Aparicio <jorge@japaric.io> | 2019-09-15 17:09:40 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-15 17:09:40 +0000 |
| commit | 4ff28e9d13e845abf39c662643ae2ff5df57ec16 (patch) | |
| tree | 7d9770cd357e584d85ef6ddc32bddd1a937d1020 /examples/init.rs | |
| parent | fafeeb27270ef24fc3852711c6032f65aa7dbcc0 (diff) | |
| parent | 7aa270cb92180abfc9102a69efdde378c3396b5e (diff) | |
Merge pull request #205 from japaric/heterogeneous
rtfm-syntax refactor + heterogeneous multi-core support
Diffstat (limited to 'examples/init.rs')
| -rw-r--r-- | examples/init.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/examples/init.rs b/examples/init.rs index df68779..194e3ec 100644 --- a/examples/init.rs +++ b/examples/init.rs @@ -5,21 +5,20 @@ #![no_main] #![no_std] -extern crate panic_semihosting; - use cortex_m_semihosting::{debug, hprintln}; +use panic_semihosting as _; -#[rtfm::app(device = lm3s6965)] +#[rtfm::app(device = lm3s6965, peripherals = true)] const APP: () = { #[init] - fn init(c: init::Context) { + fn init(cx: init::Context) { static mut X: u32 = 0; // Cortex-M peripherals - let _core: rtfm::Peripherals = c.core; + let _core: cortex_m::Peripherals = cx.core; // Device specific peripherals - let _device: lm3s6965::Peripherals = c.device; + let _device: lm3s6965::Peripherals = cx.device; // Safe access to local `static mut` variable let _x: &'static mut u32 = X; |
