- // gpio, as is: p3.20, p3.21
- PINSEL1&=~((1<<29)|(1<<28)); // p0.30
- PINSEL1&=~((1<<25)|(1<<24)); // p0.28
- PINSEL1&=~((1<<23)|(1<<22)); // p0.27
- PINSEL1&=~((1<<13)|(1<<12)); // p0.22
- PINSEL0&=~((1<<27)|(1<<26)); // p0.13
-
- // ctrl databus for p2.18 - p2.24
- PINSEL2&=(PINSEL2&(~((1<<5)|(1<<4))))|(1<<4);
-
- // ctrl addr bus for p3.20, p3.21
- PINSEL2=(PINSEL2&(~((1<<27)|(1<<26)|(1<<25))))|(1<<27)|(1<<26);
-
- // input
- IODIR0&=~((1<<30)|(1<<28)|(1<<27)|(1<<22)|(1<<13));
- IODIR3&=~((1<<21)|(1<<20));
-
- // output + pull them high
- IODIR2|=((1<<18)|(1<<19)|(1<<20)|(1<<21)|(1<<22)|(1<<23)|(1<<24));
- IOSET2=((1<<18)|(1<<19)|(1<<20)|(1<<21)|(1<<22)|(1<<23)|(1<<24));
-