timers: Fix identifier name in wait's spin-lock (#45)

Also resolves implicit definition warnings for wait by including the necessary header where applicable
This commit is contained in:
Mat M 2018-02-23 19:09:34 -05:00 committed by SciresM
parent dbf2eb7ed1
commit 34d8a859ab
2 changed files with 3 additions and 2 deletions

View file

@ -1,7 +1,8 @@
#include <stdint.h>
#include "cpu_context.h"
#include "utils.h"
#include "pmc.h"
#include "timers.h"
#include "utils.h"
saved_cpu_context_t g_cpu_contexts[NUM_CPU_CORES] = {0};

View file

@ -2,7 +2,7 @@
void wait(uint32_t microseconds) {
uint32_t old_time = TIMERUS_CNTR_1US_0;
while (TIMERUS_CNTR_1US_0 - old_time <= result) {
while (TIMERUS_CNTR_1US_0 - old_time <= microseconds) {
/* Spin-lock. */
}
}