09_delays: Fix delays in main

pull/15/head
Andre Richter 6 years ago
parent ad2d0d1182
commit 7f8960bb81
No known key found for this signature in database
GPG Key ID: 2116C1AB102F615E

Binary file not shown.

Binary file not shown.

@ -52,20 +52,20 @@ fn kernel_entry() -> ! {
delays::wait_cycles(1_000_000); delays::wait_cycles(1_000_000);
uart.puts("OK\n"); uart.puts("OK\n");
uart.puts("Waiting 1000 microsec (ARM CPU): "); uart.puts("Waiting 1 second (ARM CPU): ");
delays::wait_msec(1000); delays::wait_msec(1_000_000);
uart.puts("OK\n"); uart.puts("OK\n");
let t = delays::SysTmr::new(); let t = delays::SysTmr::new();
if t.get_system_timer() != 0 { if t.get_system_timer() != 0 {
uart.puts("Waiting 1000 microsec (BCM System Timer): "); uart.puts("Waiting 1 second (BCM System Timer): ");
t.wait_msec_st(1000); t.wait_msec_st(1_000_000);
uart.puts("OK\n"); uart.puts("OK\n");
} }
uart.puts("Looping forever now!\n"); uart.puts("Looping forever now!\n");
loop { loop {
delays::wait_msec(1000); delays::wait_msec(1_000_000);
uart.puts("Tick: 1s\n"); uart.puts("Tick: 1s\n");
} }
} }

Loading…
Cancel
Save