/* param base MCAN peripheral base address. param idx The MCAN Rx Buffer index. param pRxFrame Pointer to CAN message frame structure for reception. retval kStatus_Success - Read Message from Rx Buffer successfully.  */
status_t MCAN_ReadRxBuffer(CAN_Type *base, uint8_t idx, mcan_rx_buffer_frame_t *pRxFrame)
/* param base MCAN peripheral base address. param idx The MCAN Rx Buffer index. param pRxFrame Pointer to CAN message frame structure for reception. retval kStatus_Success - Read Message from Rx Buffer successfully.  */
status_t MCAN_ReadRxBuffer(CAN_Type *base, uint8_t idx, mcan_rx_buffer_frame_t *pRxFrame)
{
    assert(NULL != pRxFrame);
    mcan_rx_buffer_frame_t *elementAddress = NULL;
    uint32_t u4PayloadLength               = (uint32_t)(pRxFrame->size) + 8U;
    elementAddress = (mcan_rx_buffer_frame_t *)(MCAN_GetMsgRAMBase(base) + MCAN_GetRxBufferElementAddress(base, idx));
    (void)memcpy((void *)pRxFrame, (void *)elementAddress, u4PayloadLength);
    return kStatus_Success;
}