aboutsummaryrefslogtreecommitdiff
path: root/stm32f091/esp8266.c
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-10-28 14:31:56 +0200
committerlonkaars <loek@pipeframe.xyz>2022-10-28 14:31:56 +0200
commitbabb6dc29a5c4af60292ffad5216317d13e2a685 (patch)
treed5de3240e0112310c5ffc90ead6935333d5f9f78 /stm32f091/esp8266.c
parent4cd465332087e4ab12709f28fae55df10e1a1154 (diff)
fix off-by-one error and create macro for switching serial debug print color
Diffstat (limited to 'stm32f091/esp8266.c')
-rw-r--r--stm32f091/esp8266.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/stm32f091/esp8266.c b/stm32f091/esp8266.c
index 754b45b..b896567 100644
--- a/stm32f091/esp8266.c
+++ b/stm32f091/esp8266.c
@@ -58,8 +58,7 @@ void ws_esp8266_send(uint8_t* data, size_t size) {
g_ws_esp8266_dma_tx_buffer[limited_size] = 0x00;
#ifdef WS_DBG_PRINT_ESP_OVER_USART2
- uint8_t green[] = { 0x1b, 0x5b, 0x33, 0x32, 0x6d };
- HAL_UART_Transmit(&huart2, green, sizeof(green), 100);
+ ws_dbg_set_usart2_tty_color(2);
HAL_UART_Transmit(&huart2, g_ws_esp8266_dma_tx_buffer, strlen((char*) g_ws_esp8266_dma_tx_buffer), 100);
#endif