2.8.41 CANx_AutoRTRResponseSet Function
C
bool CANx_AutoRTRResponseSet(uint32_t id, uint8_t length, uint8_t* data, uint8_t fifoNum) // x - Instance of the CAN peripheral
Summary
Set the Auto RTR response for remote transmit request.
Description
This routine set the Auto RTR response for remote transmit request.
Precondition
CANx_Initialize must have been called for the associated CAN instance. Auto RTR Enable must be set to 0x1 for the requested Transmit FIFO in MCC configuration.
Parameters
| Param | Description |
|---|---|
| id | 11-bit / 29-bit identifier (ID). |
| length | Length of data buffer in number of bytes. |
| data | Pointer to source data buffer |
| fifoNum | FIFO number |
Returns
Request status. true - Request was successful.
false - Request has failed.
Example
uint8_t message[] = {0xAA, 0x55};
uint32_t messageID = 0x555;
uint8_t messageLength = 2;
CAN1_Initialize();
CAN1_AutoRTRResponseSet(messageID, messageLength, message, 1);
Remarks
Auto RTR Enable must be set to 0x1 for the requested Transmit FIFO in MCC configuration.
