Skip to content

Commit

Permalink
Merge pull request #1 from mriise/const
Browse files Browse the repository at this point in the history
fix pool example
  • Loading branch information
burrbull committed Jul 20, 2021
2 parents e4319de + 5e92715 commit 5153ff1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ mod app {

#[task(binds = I2C0, priority = 2)]
fn i2c0(_: i2c0::Context) {
// claim a memory block, leave it uninitialized and ..
let x = P::alloc().unwrap().freeze();
// claim a memory block, initialize it and ..
let x = P::alloc().unwrap().init([0u8; 128]);

// .. send it to the `foo` task
foo::spawn(x).ok().unwrap();

// send another block to the task `bar`
bar::spawn(P::alloc().unwrap().freeze()).ok().unwrap();
bar::spawn(P::alloc().unwrap().init([0u8; 128])).ok().unwrap();
}

#[task]
Expand Down

0 comments on commit 5153ff1

Please sign in to comment.