Skip to content

Commit

Permalink
Changing wording within struct from size to len
Browse files Browse the repository at this point in the history
  • Loading branch information
nwdepatie committed Dec 14, 2023
1 parent 4da5be4 commit deb1ce8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions platforms/stm32f405/include/can.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
typedef struct{
CAN_HandleTypeDef *hcan;
uint16_t *id_list;
uint8_t size;
uint8_t id_list_len;

/* desired behavior varies by app - so implement this at app level */
void (*can_callback)(CAN_HandleTypeDef *hcan);
Expand All @@ -20,7 +20,7 @@ typedef struct{
typedef struct{
uint16_t id;
uint8_t data[8];
uint8_t size;
uint8_t len;
} can_msg_t;

/* function pointer type for the callback */
Expand Down
1 change: 1 addition & 0 deletions platforms/stm32f405/src/can.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ HAL_StatusTypeDef can_init(can_t *can, can_callback callback)

/* Override the default callback for CAN_IT_RX_FIFO0_MSG_PENDING */
err = HAL_CAN_ActivateNotification(can->hcan, callback);
can->can_callback = callback;

return err;
}
Expand Down

0 comments on commit deb1ce8

Please sign in to comment.