Hi,
If you want to set one or several pin, you have to do this:
MCF_GPIO_PORTTA = portValue;
or using Port pin data/Set dataregister:
MCF_GPIO_SETTA = MCF_GPIO_PORTTA_PORTTA2; // port set register
// Cf doc chap 11.6.3
to clear use:
MCF_GPIO_CLRTA = ~MCF_GPIO_PORTTA_PORTTA2; // port clear register
// Cf doc chap 11.6.4
if you want to read the real pin state use:
uint8 yourVar;
yourVar = MCF_GPIO_SETTA; // chap 11.6.3
Don't forget to set the Data Direction Degister (chap 11.6.2)
Emmanuel