nes-proj/tests/blink-red.c

27 lines
321 B
C
Raw Normal View History

2010-02-21 15:25:22 +00:00
#include <mc1322x.h>
2010-02-23 20:52:46 +00:00
#include <board.h>
2009-11-04 22:30:18 +00:00
#define DELAY 400000
#define LED LED_RED
2009-11-04 22:30:18 +00:00
void main(void) {
volatile uint32_t i;
2009-11-04 22:30:18 +00:00
*GPIO_PAD_DIR0 = ( 1<< LED );
2009-11-04 22:30:18 +00:00
while(1) {
*GPIO_DATA0 = (1 << LED );
for(i=0; i<DELAY; i++) { continue; }
2009-11-04 22:30:18 +00:00
*GPIO_DATA0 = 0x00000000;
for(i=0; i<DELAY; i++) { continue; }
};
2009-11-04 22:30:18 +00:00
}
2009-11-04 22:30:18 +00:00