From 2435c6082a7881a61cd9b7e2bf0abb8d3a0e55be Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Fri, 13 Sep 2019 08:33:33 +0200 Subject: [PATCH] STM32F1: AUTO_BED_LEVELING_UBL build fixes (#15240) --- Marlin/src/HAL/shared/Marduino.h | 3 +++ Marlin/src/core/serial.h | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Marlin/src/HAL/shared/Marduino.h b/Marlin/src/HAL/shared/Marduino.h index 4376579f85..a2de03a2b6 100644 --- a/Marlin/src/HAL/shared/Marduino.h +++ b/Marlin/src/HAL/shared/Marduino.h @@ -58,6 +58,9 @@ //#define strchr_P(s,c) strchr(s,c) #endif + #ifndef snprintf_P + #define snprintf_P snprintf + #endif #ifndef vsnprintf_P #define vsnprintf_P vsnprintf #endif diff --git a/Marlin/src/core/serial.h b/Marlin/src/core/serial.h index a690e0fc39..fe99669390 100644 --- a/Marlin/src/core/serial.h +++ b/Marlin/src/core/serial.h @@ -75,7 +75,9 @@ extern uint8_t marlin_debug_flags; #define SERIAL_PRINTF(V...) SERIAL_OUT(printf, V) #define SERIAL_FLUSH() SERIAL_OUT(flush) -#if TX_BUFFER_SIZE > 0 +#ifdef __STM32F1__ + #define SERIAL_FLUSHTX() SERIAL_OUT(flush) +#elif TX_BUFFER_SIZE > 0 #define SERIAL_FLUSHTX() SERIAL_OUT(flushTX) #else #define SERIAL_FLUSHTX()