aboutsummaryrefslogtreecommitdiff
path: root/stm32f091/util.h
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-10-19 20:04:06 +0200
committerlonkaars <loek@pipeframe.xyz>2022-10-19 20:04:06 +0200
commitaab4ed17b94f54813368201d3a0cba3f3d432589 (patch)
tree4babada7f6d176d06a5459510533baa10ac91cd4 /stm32f091/util.h
parent2274409f898351f958975d49b0324d992c6073d0 (diff)
integrate protocol code into stm32 code
Diffstat (limited to 'stm32f091/util.h')
-rw-r--r--stm32f091/util.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/stm32f091/util.h b/stm32f091/util.h
index 8e3258f..92f093f 100644
--- a/stm32f091/util.h
+++ b/stm32f091/util.h
@@ -6,10 +6,11 @@
#include <string.h>
#include "setup.h"
+#include "../shared/util.h"
#define ws_usb_printf(fmt, ...) { \
char temp[255]; \
- sprintf(temp, fmt, ##__VA_ARGS__); \
+ snprintf(temp, 255, fmt, ##__VA_ARGS__); \
HAL_UART_Transmit(&huart2, (uint8_t*) temp, sizeof(char) * strlen(temp), HAL_MAX_DELAY); \
}