2018-02-18 02:50:39 +00:00
|
|
|
#include "timers.h"
|
|
|
|
|
|
|
|
void wait(uint32_t microseconds) {
|
|
|
|
uint32_t old_time = TIMERUS_CNTR_1US_0;
|
2018-02-24 00:09:34 +00:00
|
|
|
while (TIMERUS_CNTR_1US_0 - old_time <= microseconds) {
|
2018-02-18 02:50:39 +00:00
|
|
|
/* Spin-lock. */
|
|
|
|
}
|
|
|
|
}
|