Skip to content
Snippets Groups Projects
Commit 02917738 authored by Carl Österberg's avatar Carl Österberg
Browse files

bare8_2

parent f567d18d
Branches
No related tags found
No related merge requests found
......@@ -69,15 +69,21 @@ const APP: () = {
fn idle(cx: idle::Context) -> ! {
let rx = cx.resources.RX;
let tx = cx.resources.TX;
let mut received = 0;
let mut errors = 0;
loop {
match block!(rx.read()) {
Ok(byte) => {
received += 1;
rprintln!("Ok {:b}", byte);
rprintln!("Nmbr bytes rec {:?}",received);
tx.write(byte).unwrap();
}
Err(err) => {
errors += 1;
rprintln!("Error {:?}", err);
rprintln!("Nmbr errors rec {:?}",errors);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment