Skip to content

Commit

Permalink
initialize rl can message
Browse files Browse the repository at this point in the history
  • Loading branch information
caiodasilva2005 committed Oct 28, 2024
1 parent 2a627ba commit b098ae3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion middleware/include/can_utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
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);
7 changes: 7 additions & 0 deletions middleware/src/can_utility.c
Original file line number Diff line number Diff line change
@@ -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
*/
Expand Down

0 comments on commit b098ae3

Please sign in to comment.