uart: add ledctrl app
This commit is contained in:
11
uart/util.c
Normal file
11
uart/util.c
Normal file
@@ -0,0 +1,11 @@
|
||||
#define CYCLES_PER_MS 6666 // ish
|
||||
|
||||
/** waits a general amount of time */
|
||||
void busy_sleep(int ms) {
|
||||
for (int i = 0; i < ms; ++i) {
|
||||
// wait for 1 ms
|
||||
for (int i = 0; i < CYCLES_PER_MS; ++i) {
|
||||
// nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user