Skip to content
Snippets Groups Projects
Commit 238f1c41 authored by Ridge's avatar Ridge
Browse files

bare8_2

parent 7e9b6774
No related branches found
No related tags found
No related merge requests found
......@@ -72,17 +72,23 @@ const APP: () = {
let rx = resources.RX;
let tx = resources.TX;
let stim = &mut resources.ITM.stim[0];
let mut received = 0;
let mut errors = 0;
loop {
match block!(rx.read()) {
Ok(byte) => {
iprintln!(stim, "Ok {:?}", byte);
// iprintln!(stim, "Ok {:?}", byte);
tx.write(byte).unwrap();
received = received + 1;
}
Err(err) => {
iprintln!(stim, "Error {:?}", err);
// iprintln!(stim, "Error {:?}", err);
errors = errors + 1;
}
}
iprintln!(stim, "Received: {:?}", received);
iprintln!(stim, "Errors: {:?}", errors);
}
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment