if (adcResultInMv >4125)
{
GPIOA_PSOR |= 1<<PTA3 | 1<<PTA2;
GPIOA_PCOR |= 1<<PTB5;
if (GPIOA_PDIR & (1<<PTA1)) {
GPIOA_PSOR |= 1<<PTB5;
}
else {
GPIOA_PCOR |= 1<<PTB5;
}
}
In the above code, i want to count the switch press event and based on the number of switch pressed (if switch pressed >5 ) permanently turn off the Red LED.
Can anyone one help me to figure out this issue.