Skip to content

Commit

Permalink
Increase delays in loops in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Sh3Rm4n committed Dec 10, 2020
1 parent d15e318 commit 2e7445a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions examples/adc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

use panic_semihosting as _;

use cortex_m::asm;
use cortex_m_rt::entry;
use cortex_m_semihosting::hprintln;

Expand Down Expand Up @@ -55,5 +56,6 @@ fn main() -> ! {
loop {
let adc1_in1_data: u16 = adc1.read(&mut adc1_in1_pin).expect("Error reading adc1.");
hprintln!("PA0 reads {}", adc1_in1_data).ok();
asm::delay(2_000_000);
}
}
2 changes: 1 addition & 1 deletion examples/gpio_erased.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn main() -> ! {
loop {
for pin in pin_array.iter_mut() {
hprintln!("Value is {}", pin.is_high().unwrap()).unwrap();
asm::delay(1_000);
asm::delay(1_000_000);
}
}
}

0 comments on commit 2e7445a

Please sign in to comment.