Skip to content

Commit

Permalink
referee add daemon protection
Browse files Browse the repository at this point in the history
  • Loading branch information
jia-xie committed Apr 4, 2024
1 parent 84f1053 commit 1f7274e
Show file tree
Hide file tree
Showing 4 changed files with 167 additions and 162 deletions.
2 changes: 1 addition & 1 deletion src/bsp/Inc/bsp_uart.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ typedef struct _UART_Instance
} UART_Instance_t;

void UART_Service_Init(UART_Instance_t *uart_insatce);
UART_Instance_t *UART_Register(UART_HandleTypeDef *huart, uint8_t *rx_buffer, uint8_t rx_buffer_size, void (*callback)(UART_Instance_t *uart_instance));
UART_Instance_t *UART_Register(UART_HandleTypeDef *huart, uint8_t *rx_buffer, uint16_t rx_buffer_size, void (*callback)(UART_Instance_t *uart_instance));
HAL_StatusTypeDef UART_Transmit(UART_Instance_t *uart_instance, uint8_t *tx_buffer, uint16_t tx_buffer_size, uint8_t send_type);
#endif // BSP_UART_H
2 changes: 1 addition & 1 deletion src/bsp/Src/bsp_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void UART_Service_Init(UART_Instance_t *uart_insatce)
* @param rx_buffer_size size of the buffer
* @param callback callback function when UART receive is complete
*/
UART_Instance_t *UART_Register(UART_HandleTypeDef *huart, uint8_t *rx_buffer, uint8_t rx_buffer_size, void (*callback)(UART_Instance_t *uart_instance))
UART_Instance_t *UART_Register(UART_HandleTypeDef *huart, uint8_t *rx_buffer, uint16_t rx_buffer_size, void (*callback)(UART_Instance_t *uart_instance))
{
UART_Instance_t *uart_instance = (UART_Instance_t *)malloc(sizeof(UART_Instance_t));
uart_instance->uart_handle = huart;
Expand Down
Loading

0 comments on commit 1f7274e

Please sign in to comment.