Add support for writing RTR CAN Frames to the CAN API (#1900)

This commit is contained in:
Thad House
2019-09-28 16:49:34 -07:00
committed by Peter Johnson
parent 9f740e5905
commit cb54602d49
8 changed files with 100 additions and 0 deletions

View File

@@ -73,6 +73,20 @@ void HAL_WriteCANPacketRepeating(HAL_CANHandle handle, const uint8_t* data,
int32_t length, int32_t apiId,
int32_t repeatMs, int32_t* status);
/**
* Writes an RTR frame of the specified length to the CAN device with the
* specific ID.
*
* By spec, the length must be equal to the length sent by the other device,
* otherwise behavior is unspecified.
*
* @param handle the CAN handle
* @param length the length of data to request (0-8)
* @param apiId the ID to write (0-1023)
*/
void HAL_WriteCANRTRFrame(HAL_CANHandle handle, int32_t length, int32_t apiId,
int32_t* status);
/**
* Stops a repeating packet with a specific ID.
*