2009-12-15 20:18:48 +01:00
|
|
|
#include "mc1322x.h"
|
|
|
|
#include "boards.h"
|
2009-06-22 18:35:39 +02:00
|
|
|
|
2009-11-04 23:30:18 +01:00
|
|
|
#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
|
2009-04-21 00:31:13 +02:00
|
|
|
|
2009-11-04 23:30:18 +01:00
|
|
|
#define LED_BITS LED_RED
|
2009-03-27 21:00:10 +01:00
|
|
|
|
2009-11-04 23:30:18 +01:00
|
|
|
__attribute__ ((section ("startup")))
|
|
|
|
void main(void) {
|
2009-03-27 21:00:10 +01:00
|
|
|
volatile uint32_t i;
|
2009-11-04 23:30:18 +01:00
|
|
|
|
|
|
|
*GPIO_PAD_DIR0 = LED_BITS;
|
|
|
|
|
2009-03-27 21:00:10 +01:00
|
|
|
|
|
|
|
while(1) {
|
|
|
|
|
2009-11-04 23:30:18 +01:00
|
|
|
*GPIO_DATA0 = LED_BITS;
|
2009-03-27 21:00:10 +01:00
|
|
|
|
|
|
|
for(i=0; i<DELAY; i++) { continue; }
|
|
|
|
|
2009-11-04 23:30:18 +01:00
|
|
|
*GPIO_DATA0 = 0x00000000;
|
2009-03-27 21:00:10 +01:00
|
|
|
|
|
|
|
for(i=0; i<DELAY; i++) { continue; }
|
|
|
|
|
|
|
|
};
|
2009-11-04 23:30:18 +01:00
|
|
|
|
2009-03-27 21:00:10 +01:00
|
|
|
}
|
2009-11-04 23:30:18 +01:00
|
|
|
|