From 60609e66c309f6b6f5583a7cee0c89705785a275 Mon Sep 17 00:00:00 2001 From: batt Date: Mon, 12 Apr 2010 21:34:37 +0000 Subject: [PATCH] LPC2xxx: add timer test. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3420 38d2e660-2303-0410-9eaa-f027e97ec537 --- examples/lpc2378/lpc2378.mk | 3 +++ examples/lpc2378/main.c | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/lpc2378/lpc2378.mk b/examples/lpc2378/lpc2378.mk index 10217469..50532020 100644 --- a/examples/lpc2378/lpc2378.mk +++ b/examples/lpc2378/lpc2378.mk @@ -15,6 +15,9 @@ lpc2378_PROGRAMMER_PORT = none # Files included by the user. lpc2378_USER_CSRC = \ examples/lpc2378/main.c \ + bertos/drv/timer.c \ + bertos/cpu/arm/drv/vic_lpc2.c \ + bertos/cpu/arm/drv/timer_lpc2.c \ # # Files included by the user. diff --git a/examples/lpc2378/main.c b/examples/lpc2378/main.c index baf48c5c..7ab7b859 100644 --- a/examples/lpc2378/main.c +++ b/examples/lpc2378/main.c @@ -1,7 +1,7 @@ // Emtpy main.c file generated by the wizard #include #include - +#include #include #define STATUS_LED (1<<19) @@ -12,6 +12,7 @@ static void init(void) { IRQ_ENABLE; kdbg_init(); + timer_init(); 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(); - for (int j = 0; j < 200000; j++ ); + timer_delay(500); LED_OFF(); - for (int j = 0; j < 200000; j++ ); + timer_delay(500); } return 0; -- 2.25.1