aboutsummaryrefslogtreecommitdiff
path: root/examples/pool.rs
diff options
context:
space:
mode:
authorJorge Aparicio <jorge@japaric.io>2019-09-15 17:09:40 +0000
committerGitHub <noreply@github.com>2019-09-15 17:09:40 +0000
commit4ff28e9d13e845abf39c662643ae2ff5df57ec16 (patch)
tree7d9770cd357e584d85ef6ddc32bddd1a937d1020 /examples/pool.rs
parentfafeeb27270ef24fc3852711c6032f65aa7dbcc0 (diff)
parent7aa270cb92180abfc9102a69efdde378c3396b5e (diff)
Merge pull request #205 from japaric/heterogeneous
rtfm-syntax refactor + heterogeneous multi-core support
Diffstat (limited to 'examples/pool.rs')
-rw-r--r--examples/pool.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/pool.rs b/examples/pool.rs
index 0b594b1..8c44cb1 100644
--- a/examples/pool.rs
+++ b/examples/pool.rs
@@ -5,14 +5,13 @@
#![no_main]
#![no_std]
-extern crate panic_semihosting;
-
use cortex_m_semihosting::{debug, hprintln};
use heapless::{
pool,
pool::singleton::{Box, Pool},
};
use lm3s6965::Interrupt;
+use panic_semihosting as _;
use rtfm::app;
// Declare a pool of 128-byte memory blocks
@@ -30,8 +29,8 @@ const APP: () = {
rtfm::pend(Interrupt::I2C0);
}
- #[interrupt(priority = 2, spawn = [foo, bar])]
- fn I2C0(c: I2C0::Context) {
+ #[task(binds = I2C0, priority = 2, spawn = [foo, bar])]
+ fn i2c0(c: i2c0::Context) {
// claim a memory block, leave it uninitialized and ..
let x = P::alloc().unwrap().freeze();