#include<iolpc1788.h> int main(void) { int data; FIO0DIR |=(0<< 13); PCONP =0X00001000; AD0CR = 0X00200180;
IOCON_P0_13 =0X00000003;
while(1) { AD0CR |= (1 << 24); while (!( AD0GDR & (1 << 31))) ;
AD0CR |= (0<<24);
data = AD0GDR; } // return(0);
}
I'll hazard a guess that those statements that have the form:
x |= (0 << n);
to apparently clear a bit in an SFR should be:
x &= ~(1 << n);