Part Number: LAUNCHXL-F28379D
Hi,
I have a doubt in the code below. I am unable to understand the entry condition of the " if " block. I know that RXOK is the bit that has to be checked to confirm that the receiver has received the data with no errors. Isn't if (CAN_ES_RXOK) condition sufficient?
if(((HWREGH(CANA_BASE + CAN_O_ES) & CAN_ES_RXOK)) == CAN_ES_RXOK)
{
//
// Get the received message
//
CAN_readMessage(CANA_BASE, RX_MSG_OBJ_ID, rxMsgData);
GPIO_togglePin(65U);
rxMsgCount++;
}
Also, it would be helpful if you could define HWREGH and CAN_O_ES in short. I couldn't find it anywhere in the technical reference manual.
Thank you,
Karthikeya