mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Add support for writing RTR CAN Frames to the CAN API (#1900)
This commit is contained in:
committed by
Peter Johnson
parent
9f740e5905
commit
cb54602d49
@@ -65,6 +65,12 @@ void CAN::WritePacketRepeating(const uint8_t* data, int length, int apiId,
|
||||
wpi_setErrorWithContext(status, HAL_GetErrorMessage(status));
|
||||
}
|
||||
|
||||
void CAN::WriteRTRFrame(int length, int apiId) {
|
||||
int32_t status = 0;
|
||||
HAL_WriteCANRTRFrame(m_handle, length, apiId, &status);
|
||||
wpi_setErrorWithContext(status, HAL_GetErrorMessage(status));
|
||||
}
|
||||
|
||||
void CAN::StopPacketRepeating(int apiId) {
|
||||
int32_t status = 0;
|
||||
HAL_StopCANPacketRepeating(m_handle, apiId, &status);
|
||||
|
||||
Reference in New Issue
Block a user