1.32.3.10 CANx_MessageReceiveFifo Function
C
bool CANx_MessageReceiveFifo(CAN_RX_FIFO_NUM rxFifoNum, uint8_t numberOfMessage, CAN_RX_BUFFER *rxBuffer) // x - Instance of the CAN peripheral
Summary
Read messages from Rx FIFO0/FIFO1.
Description
This routine reads messages from Rx FIFO0/FIFO1.
Precondition
CANx_Initialize has been called.
Parameters
Param | Description |
---|---|
rxFifoNum | Rx FIFO number |
numberOfMessage | Total number of message |
rxBuffer | Pointer to Rx buffer |
Returns
true - When a message has been received
false - When a message has not been received
Example
uint8_t rxFiFo0[CAN0_RX_FIFO0_SIZE]; memset(rxFiFo0, 0x00, CAN0_RX_FIFO0_ELEMENT_SIZE); // Read 1 message from Rx FIFO 0 CAN0_MessageReceiveFifo(CAN_RX_FIFO_0, 1, (CAN_RX_BUFFER *)rxFiFo0);
Remarks
None.