aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormriise <mark.riise26@gmail.com>2021-07-20 01:13:24 -0700
committermriise <mark.riise26@gmail.com>2021-07-20 01:17:11 -0700
commit5e92715d8cfce6dd91168ece7ce07502eda3145e (patch)
treeeea7230e8020c843f6e59fab3a4e40539f734b76
parente4319de3d526285381f5cc53e14f9a17d123a81a (diff)
fix pool example
-rw-r--r--examples/pool.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/pool.rs b/examples/pool.rs
index 63be899..7c61dfb 100644
--- a/examples/pool.rs
+++ b/examples/pool.rs
@@ -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]