From 419558b11fc280421eb525e545b5bb4d1662702f Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 25 Oct 2024 23:20:55 -0400 Subject: [PATCH] Fixed A Couple Bugs --- platforms/stm32f405/include/can.h | 1 + platforms/stm32f405/src/can.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/platforms/stm32f405/include/can.h b/platforms/stm32f405/include/can.h index 69fb2ea..d923022 100644 --- a/platforms/stm32f405/include/can.h +++ b/platforms/stm32f405/include/can.h @@ -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 \ No newline at end of file diff --git a/platforms/stm32f405/src/can.c b/platforms/stm32f405/src/can.c index fdf7d76..f478b26 100644 --- a/platforms/stm32f405/src/can.c +++ b/platforms/stm32f405/src/can.c @@ -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;