Add aliases
This commit is contained in:
+3
-1
@@ -33,5 +33,7 @@ typedef uint8_t CanFilterBank;
|
|||||||
|
|
||||||
typedef HAL_StatusTypeDef HalStatus;
|
typedef HAL_StatusTypeDef HalStatus;
|
||||||
typedef CAN_HandleTypeDef CanHandle;
|
typedef CAN_HandleTypeDef CanHandle;
|
||||||
|
typedef CAN_TxHeaderTypeDef CanTxHeader;
|
||||||
|
typedef CAN_RxHeaderTypeDef CanRxHeader;
|
||||||
|
|
||||||
#endif /* INC_MMR_TYPES_H_ */
|
#endif /* INC_MMR_CAN_TYPES_H_ */
|
||||||
|
|||||||
+2
-2
@@ -36,7 +36,7 @@ MmrCanFilterSettings MMR_CAN_GetDefaultFilterSettings() {
|
|||||||
|
|
||||||
|
|
||||||
HalStatus MMR_CAN_Send(CanHandle *hcan, MmrCanPacket packet) {
|
HalStatus MMR_CAN_Send(CanHandle *hcan, MmrCanPacket packet) {
|
||||||
CAN_TxHeaderTypeDef header = {
|
CanTxHeader header = {
|
||||||
.IDE = CAN_ID_STD,
|
.IDE = CAN_ID_STD,
|
||||||
.RTR = CAN_RTR_DATA,
|
.RTR = CAN_RTR_DATA,
|
||||||
.DLC = packet.length,
|
.DLC = packet.length,
|
||||||
@@ -49,7 +49,7 @@ HalStatus MMR_CAN_Send(CanHandle *hcan, MmrCanPacket packet) {
|
|||||||
|
|
||||||
|
|
||||||
static void __handleCanRxInterrupt(CAN_HandleTypeDef *hcan) {
|
static void __handleCanRxInterrupt(CAN_HandleTypeDef *hcan) {
|
||||||
static CAN_RxHeaderTypeDef rxHeader = {};
|
static CanRxHeader rxHeader = {};
|
||||||
static CanRxBuffer rxData = {};
|
static CanRxBuffer rxData = {};
|
||||||
|
|
||||||
HAL_CAN_GetRxMessage(hcan, MMR_CAN_RX_FIFO, &rxHeader, rxData);
|
HAL_CAN_GetRxMessage(hcan, MMR_CAN_RX_FIFO, &rxHeader, rxData);
|
||||||
|
|||||||
Reference in New Issue
Block a user