End blinking for developer sanity
This commit is contained in:
parent
5494de25df
commit
9088b700f5
1 changed files with 3 additions and 1 deletions
4
main.c
4
main.c
|
@ -1,3 +1,4 @@
|
||||||
|
#include "libopencm3/cm3/vector.h"
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "uart.h"
|
#include "uart.h"
|
||||||
|
@ -56,9 +57,10 @@ int main(void) {
|
||||||
while (sys_ticks_get() == init);
|
while (sys_ticks_get() == init);
|
||||||
|
|
||||||
uint64_t ref = 0;
|
uint64_t ref = 0;
|
||||||
while (1) {
|
for (int i = 0; i < 20;) {
|
||||||
if (sys_ticks_get() > ref) {
|
if (sys_ticks_get() > ref) {
|
||||||
ref += 500;
|
ref += 500;
|
||||||
|
i++;
|
||||||
gpio_toggle(GPIOC, GPIO13);
|
gpio_toggle(GPIOC, GPIO13);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue