12 #include "hal/Types.h"
20 HAL_ENUM(HAL_CANDeviceType) {
21 HAL_CAN_Dev_kBroadcast = 0,
22 HAL_CAN_Dev_kRobotController = 1,
23 HAL_CAN_Dev_kMotorController = 2,
24 HAL_CAN_Dev_kRelayController = 3,
25 HAL_CAN_Dev_kGyroSensor = 4,
26 HAL_CAN_Dev_kAccelerometer = 5,
27 HAL_CAN_Dev_kUltrasonicSensor = 6,
28 HAL_CAN_Dev_kGearToothSensor = 7,
29 HAL_CAN_Dev_kPowerDistribution = 8,
30 HAL_CAN_Dev_kPneumatics = 9,
31 HAL_CAN_Dev_kMiscellaneous = 10,
32 HAL_CAN_Dev_kFirmwareUpdate = 31
40 HAL_ENUM(HAL_CANManufacturer) {
41 HAL_CAN_Man_kBroadcast = 0,
44 HAL_CAN_Man_kDEKA = 3,
45 HAL_CAN_Man_kCTRE = 4,
47 HAL_CAN_Man_kTeamUse = 8,
65 HAL_CANHandle HAL_InitializeCAN(HAL_CANManufacturer manufacturer,
66 int32_t deviceId, HAL_CANDeviceType deviceType,
74 void HAL_CleanCAN(HAL_CANHandle handle);
86 void HAL_WriteCANPacket(HAL_CANHandle handle,
const uint8_t* data,
87 int32_t length, int32_t apiId, int32_t* status);
102 void HAL_WriteCANPacketRepeating(HAL_CANHandle handle,
const uint8_t* data,
103 int32_t length, int32_t apiId,
104 int32_t repeatMs, int32_t* status);
114 void HAL_StopCANPacketRepeating(HAL_CANHandle handle, int32_t apiId,
130 void HAL_ReadCANPacketNew(HAL_CANHandle handle, int32_t apiId, uint8_t* data,
131 int32_t* length, uint64_t* receivedTimestamp,
145 void HAL_ReadCANPacketLatest(HAL_CANHandle handle, int32_t apiId, uint8_t* data,
146 int32_t* length, uint64_t* receivedTimestamp,
162 void HAL_ReadCANPacketTimeout(HAL_CANHandle handle, int32_t apiId,
163 uint8_t* data, int32_t* length,
164 uint64_t* receivedTimestamp, int32_t timeoutMs,
184 void HAL_ReadCANPeriodicPacket(HAL_CANHandle handle, int32_t apiId,
185 uint8_t* data, int32_t* length,
186 uint64_t* receivedTimestamp, int32_t timeoutMs,
187 int32_t periodMs, int32_t* status);