int main(void){
setup_GPIOs();
uint8_t caseSW = 2;
while(1) {
if(GPIOPinRead(GPIO_PORTJ_BASE, GPIO_PIN_0) == 0) { bCase++;
if(bCase % 2 == 0) { caseSW = 0;
} else { caseSW = 1; } }
switch(caseSW) { case 0: GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_0, GPIOPinRead(GPIO_PORTN_BASE, GPIO_PIN_0) ^ GPIO_PIN_0); break; case 1: GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_1, GPIOPinRead(GPIO_PORTN_BASE, GPIO_PIN_1) ^ GPIO_PIN_1); break; default: GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_0, 0); GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_1, 0); break; }
}}