diff --git a/middleware/include/can_utility.h b/middleware/include/can_utility.h index 45940bc..80ee63b 100644 --- a/middleware/include/can_utility.h +++ b/middleware/include/can_utility.h @@ -7,4 +7,5 @@ typedef struct { uint8_t msg_rate; /* in messages per second */ } rl_can_msg_t; -HAL_StatusTypeDef send_rl_can_msg(can_t *can, rl_can_msg_t *rl_can_msg); \ No newline at end of file +HAL_StatusTypeDef send_rl_can_msg(can_t *can, rl_can_msg_t *rl_can_msg); +HAL_StatusTypeDef rl_can_msg_init(rl_can_msg_t *rl_can_msg); \ No newline at end of file diff --git a/middleware/src/can_utility.c b/middleware/src/can_utility.c index 70f6d8b..78fd3a5 100644 --- a/middleware/src/can_utility.c +++ b/middleware/src/can_utility.c @@ -1,6 +1,13 @@ #include "can_utility.h" +HAL_StatusTypeDef rl_can_msg_init(rl_can_msg_t *rl_can_msg) +{ + rl_can_msg->msg_timer = osTimerNew(NULL, osTimerOnce, NULL, NULL); + + return HAL_OK; +} + /** * Sends a rate limited can message */