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

bare8_2

parent f567d18d
No related branches found
No related tags found
No related merge requests found
...@@ -69,15 +69,21 @@ const APP: () = { ...@@ -69,15 +69,21 @@ const APP: () = {
fn idle(cx: idle::Context) -> ! { fn idle(cx: idle::Context) -> ! {
let rx = cx.resources.RX; let rx = cx.resources.RX;
let tx = cx.resources.TX; let tx = cx.resources.TX;
let mut received = 0;
let mut errors = 0;
loop { loop {
match block!(rx.read()) { match block!(rx.read()) {
Ok(byte) => { Ok(byte) => {
received += 1;
rprintln!("Ok {:b}", byte); rprintln!("Ok {:b}", byte);
rprintln!("Nmbr bytes rec {:?}",received);
tx.write(byte).unwrap(); tx.write(byte).unwrap();
} }
Err(err) => { Err(err) => {
errors += 1;
rprintln!("Error {:?}", err); 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