mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2024-05-19 08:48:17 +00:00
respond to jorges reviw– fix off by one err
This commit is contained in:
parent
35a78540c0
commit
f502132139
|
@ -197,7 +197,7 @@ fn notmain() -> Result<i32, anyhow::Error> {
|
||||||
Err(probe_rs_rtt::Error::ControlBlockNotFound);
|
Err(probe_rs_rtt::Error::ControlBlockNotFound);
|
||||||
const NUM_RETRIES: usize = 3; // picked at random, increase if necessary
|
const NUM_RETRIES: usize = 3; // picked at random, increase if necessary
|
||||||
|
|
||||||
for try_index in 0..NUM_RETRIES {
|
for try_index in 0..=NUM_RETRIES {
|
||||||
rtt_res = Rtt::attach_region(core.clone(), &sess, &ScanRegion::Exact(rtt_addr_res));
|
rtt_res = Rtt::attach_region(core.clone(), &sess, &ScanRegion::Exact(rtt_addr_res));
|
||||||
match rtt_res {
|
match rtt_res {
|
||||||
Ok(_) => {
|
Ok(_) => {
|
||||||
|
|
Loading…
Reference in a new issue