Skip to content

Commit 2e7445a

Browse files
committed
Increase delays in loops in examples
1 parent d15e318 commit 2e7445a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

examples/adc.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
66
use panic_semihosting as _;
77

8+
use cortex_m::asm;
89
use cortex_m_rt::entry;
910
use cortex_m_semihosting::hprintln;
1011

@@ -55,5 +56,6 @@ fn main() -> ! {
5556
loop {
5657
let adc1_in1_data: u16 = adc1.read(&mut adc1_in1_pin).expect("Error reading adc1.");
5758
hprintln!("PA0 reads {}", adc1_in1_data).ok();
59+
asm::delay(2_000_000);
5860
}
5961
}

examples/gpio_erased.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fn main() -> ! {
5050
loop {
5151
for pin in pin_array.iter_mut() {
5252
hprintln!("Value is {}", pin.is_high().unwrap()).unwrap();
53-
asm::delay(1_000);
53+
asm::delay(1_000_000);
5454
}
5555
}
5656
}

0 commit comments

Comments
 (0)