I am using TRK- KEA128 Board and having following question regarding how to access individual bit of PORT.
Actually i am trying to read PORTA0 and PORTB3 here :in the following code if Statement work as expected (for checking logic High bit at PTA0 & PTB3) but as soon as i check the same code for logic low state (this is what i am doing in if statement : if ((GPIOA_PDIR & GPIO_PDIR_PDI(0x0000)) >> 0 && (GPIOA_PDIR & GPIO_PDIR_PDI(0x0000)) >> 11) ) and the code always going in else statement , it doesn't matter PTA0 and PTB3 high or low.
if ((GPIOA_PDIR & GPIO_PDIR_PDI(0x0001)) >> 0 && (GPIOA_PDIR & GPIO_PDIR_PDI(0x0800)) >> 11)
GPIOA_PDOR = 0x30000; // Initialise the PORTA, PORTB LED PTC0 & PTC1
GPIOA_PDOR = 0xC0000; // LED PTC3 & PTC4
Thanks and Kind Regards,