Skip to content

Commit

Permalink
Fixed A Couple Bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
dnakhooda committed Oct 26, 2024
1 parent f1e2bcb commit 419558b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions platforms/stm32f405/include/can.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ typedef struct {

HAL_StatusTypeDef can_init(can_t *can);
HAL_StatusTypeDef can_send_msg(can_t *can, can_msg_t *msg);
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);

#endif // CAN_H
4 changes: 2 additions & 2 deletions platforms/stm32f405/src/can.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ HAL_StatusTypeDef can_add_filter(can_t *can, uint32_t id1, uint32_t id2, uint32_
filter.FilterIdHigh = id3 << 5u;
filter.FilterMaskIdHigh = id4 << 5u;

tsCanFilter.FilterBank = 0;
filter.FilterBank = 0;

uint8_t err = 0;
err = HAL_CAN_ConfigFilter(&can->hcan, &tsCanFilter );
err = HAL_CAN_ConfigFilter(can->hcan, &filter);
if (err != HAL_OK)
return err;

Expand Down

0 comments on commit 419558b

Please sign in to comment.