diff options
Diffstat (limited to 'openpicc/application/led.c')
-rw-r--r-- | openpicc/application/led.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/openpicc/application/led.c b/openpicc/application/led.c index c414e92..6defff6 100644 --- a/openpicc/application/led.c +++ b/openpicc/application/led.c @@ -29,6 +29,8 @@ #include "led.h" /**********************************************************************/ +#define BLINK_TIME 10 + void vLedSetRed(bool_t on) { if(on) @@ -38,7 +40,16 @@ void vLedSetRed(bool_t on) } /**********************************************************************/ -extern void vLedSetGreen(bool_t on) +void vLedBlinkRed(void) +{ + volatile int i=0; + vLedSetRed(1); + for(i=0; i<BLINK_TIME; i++) (void)i; + vLedSetRed(0); +} +/**********************************************************************/ + +void vLedSetGreen(bool_t on) { if(on) AT91F_PIO_ClearOutput( AT91C_BASE_PIOA, LED_GREEN ); @@ -47,6 +58,15 @@ extern void vLedSetGreen(bool_t on) } /**********************************************************************/ +void vLedBlinkGreen(void) +{ + volatile int i=0; + vLedSetGreen(1); + for(i=0; i<BLINK_TIME; i++) (void)i; + vLedSetGreen(0); +} +/**********************************************************************/ + void vLedHaltBlinking(int reason) { volatile u_int32_t i=0; |