#define PINSEL2 (*((volatile unsigned long *) 0x4002C008))
#define PINSEL3 (*((volatile unsigned long *) 0x4002C00C))
#define PINMODE2 (*((volatile unsigned long *) 0x4002C048))
#define PINMODE3 (*((volatile unsigned long *) 0x4002C04C))
#define FIO1DIR (*((volatile unsigned long *) 0x2009C020))
#define FIO1MASK (*((volatile unsigned long *) 0x2009C030))
#define FIO1PIN (*((volatile unsigned long *) 0x2009C034))
#define FIO1SET (*((volatile unsigned long *) 0x2009C038))
#define FIO1CLR (*((volatile unsigned long *) 0x2009C03c))
int main (void)
{
PINSEL2 = 0;
PINSEL3 = 0;
PINMODE2 = 0xAAAAAAAA; /*neither pull-up nor pull-down.*/
PINMODE3 = 0xAAAAAAAA; /*neither pull-up nor pull-down.*/
PINMODE_OD1 = 0;
FIO1DIR = ~0; //all are output
FIO1MASK = 0;
FIO1PIN = ~0; //high
while(1) {
FIO1PIN = ~FIO1PIN;
delay(10000);
}
}