From: batt Date: Mon, 12 Apr 2010 21:34:37 +0000 (+0000) Subject: LPC2xxx: add timer test. X-Git-Tag: 2.5.0~488 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=60609e66c309f6b6f5583a7cee0c89705785a275;p=bertos.git LPC2xxx: add timer test. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3420 38d2e660-2303-0410-9eaa-f027e97ec537 --- 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;