Skip to content

Commit

Permalink
Even More Bug Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dnakhooda committed Oct 26, 2024
1 parent 419558b commit ff1ec7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion platforms/stm32f405/include/can.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ typedef struct {
} can_msg_t;

HAL_StatusTypeDef can_init(can_t *can);
HAL_StatusTypeDef can_send_msg(can_t *can, can_msg_t *msg);
HAL_StatusTypeDef can_add_filter(can_t *can, uint32_t id1, uint32_t id2, uint32_t id3, uint32_t id4);
HAL_StatusTypeDef can_send_msg(can_t *can, can_msg_t *msg);
HAL_StatusTypeDef can_send_extended_msg(can_t *can, can_msg_t *msg);

Expand Down
5 changes: 3 additions & 2 deletions platforms/stm32f405/src/can.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ HAL_StatusTypeDef can_init(can_t *can)
return err;
}

HAL_StatusTypeDef can_add_filter(can_t *can, uint32_t id1, uint32_t id2, uint32_t id3, uint32_t id4) {
HAL_StatusTypeDef can_add_filter(can_t *can, uint32_t id1, uint32_t id2, uint32_t id3, uint32_t id4)
{
CAN_FilterTypeDef filter;

filter.FilterActivation = ENABLE;
Expand All @@ -80,7 +81,7 @@ HAL_StatusTypeDef can_add_filter(can_t *can, uint32_t id1, uint32_t id2, uint32_
err = HAL_CAN_ConfigFilter(can->hcan, &filter);
if (err != HAL_OK)
return err;

return HAL_CAN_Start(can->hcan);
}

Expand Down

0 comments on commit ff1ec7a

Please sign in to comment.