Browse Source

STM32F1: AUTO_BED_LEVELING_UBL build fixes (#15240)

Tanguy Pruvot 5 years ago
parent
commit
2435c6082a
2 changed files with 6 additions and 1 deletions
  1. 3
    0
      Marlin/src/HAL/shared/Marduino.h
  2. 3
    1
      Marlin/src/core/serial.h

+ 3
- 0
Marlin/src/HAL/shared/Marduino.h View File

58
     //#define strchr_P(s,c) strchr(s,c)
58
     //#define strchr_P(s,c) strchr(s,c)
59
   #endif
59
   #endif
60
 
60
 
61
+  #ifndef snprintf_P
62
+    #define snprintf_P snprintf
63
+  #endif
61
   #ifndef vsnprintf_P
64
   #ifndef vsnprintf_P
62
     #define vsnprintf_P vsnprintf
65
     #define vsnprintf_P vsnprintf
63
   #endif
66
   #endif

+ 3
- 1
Marlin/src/core/serial.h View File

75
 #define SERIAL_PRINTF(V...)     SERIAL_OUT(printf, V)
75
 #define SERIAL_PRINTF(V...)     SERIAL_OUT(printf, V)
76
 #define SERIAL_FLUSH()          SERIAL_OUT(flush)
76
 #define SERIAL_FLUSH()          SERIAL_OUT(flush)
77
 
77
 
78
-#if TX_BUFFER_SIZE > 0
78
+#ifdef __STM32F1__
79
+  #define SERIAL_FLUSHTX()      SERIAL_OUT(flush)
80
+#elif TX_BUFFER_SIZE > 0
79
   #define SERIAL_FLUSHTX()      SERIAL_OUT(flushTX)
81
   #define SERIAL_FLUSHTX()      SERIAL_OUT(flushTX)
80
 #else
82
 #else
81
   #define SERIAL_FLUSHTX()
83
   #define SERIAL_FLUSHTX()

Loading…
Cancel
Save