Jump to main content

##

# 2.64.12 MCANx_MessageReceiveFifo Function

## C

    bool MCANx_MessageReceiveFifo(MCAN_RX_FIFO_NUM rxFifoNum, uint8_t numberOfMessage, MCAN_RX_BUFFER *rxBuffer) // x - Instance of the MCAN peripheral

## Summary

Read messages from Rx FIFO0/FIFO1.

## Description

This routine reads messages from Rx FIFO0/FIFO1.

## Precondition

MCANx_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[MCAN0_RX_FIFO0_SIZE];
    memset(rxFiFo0, 0x00, MCAN0_RX_FIFO0_ELEMENT_SIZE);
    // Read 1 message from Rx FIFO 0
    MCAN0_MessageReceiveFifo(MCAN_RX_FIFO_0, 1, (MCAN_RX_BUFFER *)rxFiFo0)

## Remarks

None.