mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-23 20:22:51 +01:00
example: pool: Do not print the addr
Unstable and prone to fail CI
This commit is contained in:
parent
d43c2b64cc
commit
dbc6964f88
2 changed files with 4 additions and 10 deletions
|
@ -1,2 +0,0 @@
|
||||||
bar(0x20000088)
|
|
||||||
foo(0x2000010c)
|
|
|
@ -20,7 +20,7 @@ pool!(P: [u8; 128]);
|
||||||
#[app(device = lm3s6965, dispatchers = [SSI0, QEI0])]
|
#[app(device = lm3s6965, dispatchers = [SSI0, QEI0])]
|
||||||
mod app {
|
mod app {
|
||||||
use crate::{Box, Pool};
|
use crate::{Box, Pool};
|
||||||
use cortex_m_semihosting::{debug, hprintln};
|
use cortex_m_semihosting::debug;
|
||||||
use lm3s6965::Interrupt;
|
use lm3s6965::Interrupt;
|
||||||
|
|
||||||
// Import the memory pool into scope
|
// Import the memory pool into scope
|
||||||
|
@ -57,19 +57,15 @@ mod app {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[task]
|
#[task]
|
||||||
fn foo(_: foo::Context, x: Box<P>) {
|
fn foo(_: foo::Context, _x: Box<P>) {
|
||||||
hprintln!("foo({:?})", x.as_ptr());
|
|
||||||
|
|
||||||
// explicitly return the block to the pool
|
// explicitly return the block to the pool
|
||||||
drop(x);
|
drop(_x);
|
||||||
|
|
||||||
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
|
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
|
||||||
}
|
}
|
||||||
|
|
||||||
#[task(priority = 2)]
|
#[task(priority = 2)]
|
||||||
fn bar(_: bar::Context, x: Box<P>) {
|
fn bar(_: bar::Context, _x: Box<P>) {
|
||||||
hprintln!("bar({:?})", x.as_ptr());
|
|
||||||
|
|
||||||
// this is done automatically so we can omit the call to `drop`
|
// this is done automatically so we can omit the call to `drop`
|
||||||
// drop(x);
|
// drop(x);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue