Alexan E
/
FlashingLeds
Flashing leds using the four timer interrupts , 100ms, 200ms, 400ms, 800ms
Diff: main.cpp
- Revision:
- 1:2de8ee478e07
- Parent:
- 0:cfdf9730f216
- Child:
- 2:c4ff35a68acd
--- a/main.cpp Thu May 17 22:30:21 2012 +0000 +++ b/main.cpp Sat May 19 23:32:26 2012 +0000 @@ -2,7 +2,11 @@ Code created using the ARMwizard, visit http://alexan.edaboard.eu ************************************************************************************/ +/* #include <LPC11Uxx.h> +*/ + +#include "mbed.h" #define LED1 1UL<<8 #define LED2 1UL<<9 @@ -13,7 +17,7 @@ /****************************************************************************** 16-bit Timer0 Interrupt service function ******************************************************************************/ -void TIMER16_0_IRQHandler(void) { +extern "C" void TIMER16_0_IRQHandler(void) { /* write code here */ LPC_GPIO->PIN[1] ^= LED3; @@ -24,7 +28,7 @@ /****************************************************************************** 16-bit Timer1 Interrupt service function ******************************************************************************/ -void TIMER16_1_IRQHandler(void) { +extern "C" void TIMER16_1_IRQHandler(void) { /* write code here */ LPC_GPIO->PIN[1] ^= LED4; @@ -35,7 +39,7 @@ /****************************************************************************** 32-bit Timer0 Interrupt service function ******************************************************************************/ -void TIMER32_0_IRQHandler(void) { +extern "C" void TIMER32_0_IRQHandler(void) { /* write code here */ LPC_GPIO->PIN[1] ^= LED1; @@ -46,7 +50,7 @@ /****************************************************************************** 32-bit Timer1 Interrupt service function ******************************************************************************/ -void TIMER32_1_IRQHandler(void) { +extern "C" void TIMER32_1_IRQHandler(void) { /* write code here */ LPC_GPIO->PIN[1] ^= LED2;