projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LPC2xxx: add timer test.
[bertos.git]
/
examples
/
lpc2378
/
main.c
diff --git
a/examples/lpc2378/main.c
b/examples/lpc2378/main.c
index baf48c5c666e7e6655e4d9bb523589dd1e3e8368..7ab7b8594bdb31f6fac10102e2358d509635c751 100644
(file)
--- a/
examples/lpc2378/main.c
+++ b/
examples/lpc2378/main.c
@@
-1,7
+1,7
@@
// Emtpy main.c file generated by the wizard
#include <cpu/irq.h>
#include <cfg/debug.h>
// Emtpy main.c file generated by the wizard
#include <cpu/irq.h>
#include <cfg/debug.h>
-
+#include <drv/timer.h>
#include <io/lpc23xx.h>
#define STATUS_LED (1<<19)
#include <io/lpc23xx.h>
#define STATUS_LED (1<<19)
@@
-12,6
+12,7
@@
static void init(void)
{
IRQ_ENABLE;
kdbg_init();
{
IRQ_ENABLE;
kdbg_init();
+ timer_init();
kprintf("NXP LPC2378 BeRTOS port test\n");
/* Turn off boot led */
IODIR0 = (1<<21);
kprintf("NXP LPC2378 BeRTOS port test\n");
/* Turn off boot led */
IODIR0 = (1<<21);
@@
-33,10
+34,10
@@
int main(void)
kprintf("BeRTOS is up & running: %c\r",
spinner[i % countof(spinner)]);
LED_ON();
kprintf("BeRTOS is up & running: %c\r",
spinner[i % countof(spinner)]);
LED_ON();
-
for (int j = 0; j < 200000; j++
);
+
timer_delay(500
);
LED_OFF();
LED_OFF();
-
for (int j = 0; j < 200000; j++
);
+
timer_delay(500
);
}
return 0;
}
return 0;