#define device0 (*((volatile unsigned short *) 0x83000000)) void FMwriteReg0(unsigned int addr,unsigned int dat) { device0 = addr; device0 = dat; }
void main(void) { while(1) { FMwriteReg0(0x10, 0xa5); } }
PINSEL0 = 0x80050005; PINSEL1 = 0x00000001; PINSEL2 = PINSEL2|0x0F814030; IO0DIR = 0x8FFFFFFF; IO1DIR = 0x017B0000; IO3DIR = 0x044FFFFF; |