/* param base MCAN peripheral base pointer. param idx The MCAN buffer index. param pTxFrame Pointer to CAN message frame to be sent. retval kStatus_Success - Write Tx Message Buffer Successfully. retval kStatus_Fail - Tx Message Buffer is currently in use.  */
status_t MCAN_TransferSendBlocking(CAN_Type *base, uint8_t idx, mcan_tx_buffer_frame_t *pTxFrame)
/* param base MCAN peripheral base pointer. param idx The MCAN buffer index. param pTxFrame Pointer to CAN message frame to be sent. retval kStatus_Success - Write Tx Message Buffer Successfully. retval kStatus_Fail - Tx Message Buffer is currently in use.  */
status_t MCAN_TransferSendBlocking(CAN_Type *base, uint8_t idx, mcan_tx_buffer_frame_t *pTxFrame)
{
    status_t status;
    if (kStatus_Success == MCAN_WriteTxBuffer(base, idx, pTxFrame))
    {
        MCAN_TransmitAddRequest(base, idx);
        while (0U == MCAN_IsTransmitOccurred(base, idx))
        {
        }
        status = kStatus_Success;
    }
    else
    {
        status = kStatus_Fail;
    }
    return status;
}