2009-03-27 20:00:10 +00:00
|
|
|
#define MBAR_GPIO 0x80000000
|
|
|
|
#define GPIO_PAD_DIR0 0x80000000
|
|
|
|
#define GPIO_DATA0 0x80000008
|
|
|
|
#define UART1_DATA 0x80005008
|
|
|
|
#define DELAY 400000
|
|
|
|
|
|
|
|
#include "embedded_types.h"
|
2009-04-20 22:31:13 +00:00
|
|
|
#include "isr.h"
|
2009-06-22 16:35:39 +00:00
|
|
|
#include "led.h"
|
|
|
|
|
|
|
|
#define LED_BITS LED_GREEN
|
2009-04-20 22:31:13 +00:00
|
|
|
|
2009-04-04 19:52:09 +00:00
|
|
|
__attribute__ ((section ("startup")))
|
2009-03-27 20:00:10 +00:00
|
|
|
void main(void) {
|
|
|
|
|
2009-06-22 16:35:39 +00:00
|
|
|
*(volatile uint32_t *)GPIO_PAD_DIR0 = LED_BITS;
|
2009-03-27 20:00:10 +00:00
|
|
|
|
|
|
|
volatile uint32_t i;
|
|
|
|
|
|
|
|
while(1) {
|
|
|
|
|
2009-06-22 16:35:39 +00:00
|
|
|
*(volatile uint32_t *)GPIO_DATA0 = LED_BITS;
|
2009-03-27 20:00:10 +00:00
|
|
|
|
|
|
|
for(i=0; i<DELAY; i++) { continue; }
|
|
|
|
|
|
|
|
*(volatile uint32_t *)GPIO_DATA0 = 0x00000000;
|
|
|
|
|
|
|
|
for(i=0; i<DELAY; i++) { continue; }
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|