updated to use the leds on the RedBee hardware and made it a little more general.

Signed-off-by: Mariano Alvira <mar@devl.org>
This commit is contained in:
Mariano Alvira 2009-06-22 12:35:39 -04:00
parent c419d7403b
commit e1059a9b15
9 changed files with 51 additions and 17 deletions

View file

@ -50,10 +50,11 @@
//#include "sys-interrupt.h"
#include "isr.h"
#include "led.h"
volatile uint8_t led;
#define LED_VAL 0x00000300
#define LED_VAL LED_PURPLE
#define led_init() do { reg32(GPIO_PAD_DIR0) = LED_VAL; } while(0);
#define led_on() do { led = 1; reg32(GPIO_DATA0) = LED_VAL; } while(0);
#define led_off() do { led = 0; reg32(GPIO_DATA0) = 0x00000000; } while(0);