1.3.3.3 1.9.3.3 1.29.3.3 1.32.3.3 CANx_MessageTransmitFifo Function
C
bool CANx_MessageTransmitFifo(uint8_t numberOfMessage, CAN_TX_BUFFER *txBuffer) // x - Instance of the CAN peripheral
Summary
Transmit multiple messages into CAN bus from Tx FIFO.
Description
This routine transmit multiple messages into CAN bus from Tx FIFO.
Precondition
CANx_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[CAN0_TX_FIFO_BUFFER_SIZE]; CAN_TX_BUFFER *txBuffer = (CAN_TX_BUFFER *)txFiFo; memset(txFiFo, 0x00, CAN0_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 CAN0_MessageTransmitFifo(1, txBuffer);
Remarks
None.