clean up gpio and leds

This commit is contained in:
Mariano Alvira 2010-02-23 15:16:12 -05:00
parent e825aa8bc9
commit 1522b72b1e
4 changed files with 14 additions and 6 deletions

View File

@ -1,4 +1,8 @@
#ifndef BOARD_REDBEE_DEV_H
#define BOARD_REDBEE_DEV_H
#define LED_RED (1 << 23)
#define LED_GREEN (1 << 24)
#define LED_BLUE (1 << 25)
#endif

8
board/redbee-r1.h Normal file
View File

@ -0,0 +1,8 @@
#ifndef BOARD_REDBEE_R1_H
#define BOARD_REDBEE_R1_H
#define LED_RED (1 << 8)
#define LED_GREEN (1 << 9)
#define LED_BLUE (1 << 10)
#endif

View File

@ -3,5 +3,6 @@
#include "types.h"
#include "isr.h"
#include "gpio.h"
#endif

View File

@ -1,12 +1,8 @@
#include <mc1322x.h>
#define MBAR_GPIO 0x80000000
#define GPIO_PAD_DIR0 ((volatile uint32_t *) 0x80000000)
#define GPIO_DATA0 ((volatile uint32_t *) 0x80000008)
#define UART1_DATA ((volatile uint32_t *) 0x80005008)
#define DELAY 400000
//#define LED_BITS LED_RED
#define LED_BITS LED_RED
__attribute__ ((section ("startup")))
void main(void) {
@ -14,7 +10,6 @@ void main(void) {
// *GPIO_PAD_DIR0 = LED_BITS;
while(1) {
// *GPIO_DATA0 = LED_BITS;