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 authored and SciresM committed 2018-02-23 16:09:34 -08:00
1 parent dbf2eb7ed1
commit 34d8a859ab
2 files changed
+3 -2

No files matched your search

+2 -1
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};
+1 -1
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. */
}
}