1.26.6.5 1.27.9.5 1.28.10.5 1.34.7.5 1.41.8.5 1.42.6.5 MCANx_MessageTransmitFifo Function
C
bool MCANx_MessageTransmitFifo(uint8_t numberOfMessage, MCAN_TX_BUFFER *txBuffer) // x - Instance of the MCAN peripheral
Summary
Transmit multiple messages into CAN bus from Tx FIFO.
Description
This routine transmit multiple messages into MCAN bus from Tx FIFO.
Precondition
MCANx_Initialize has been called.
Parameters
Param | Description |
---|---|
numberOfMessage | Total number of message |
txBuffer | Pointer to Tx buffer |
Returns
Boolean "true" when a message has been transmitted.
Example
uint8_t loop_count = 0; uint8_t txFiFo[MCAN0_TX_FIFO_BUFFER_SIZE]; MCAN_TX_BUFFER *txBuffer = (MCAN_TX_BUFFER *)txFiFo; memset(txFiFo, 0x00, MCAN0_TX_FIFO_BUFFER_ELEMENT_SIZE); txBuffer->id = 0x100000A5; txBuffer->dlc = 8; txBuffer->xtd = 1; txBuffer->fdf = 1; txBuffer->brs = 1; for (loop_count = 0; loop_count < 8; loop_count++){ txBuffer->data[loop_count] = loop_count; } // Transmit message from Tx FIFO MCAN0_MessageTransmitFifo(1, txBuffer);
Remarks
None.