Fix and improve STM32F1 serial (#19464)
This commit is contained in:
@@ -422,3 +422,37 @@
|
||||
#if ANY(AUTO_BED_LEVELING_UBL, AUTO_BED_LEVELING_LINEAR, Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
|
||||
#define NEED_LSF 1
|
||||
#endif
|
||||
|
||||
// Flag the indexed serial ports that are in use
|
||||
#define ANY_SERIAL_IS(N) (defined(SERIAL_PORT) && SERIAL_PORT == (N)) || (defined(SERIAL_PORT_2) && SERIAL_PORT_2 == (N)) || (defined(LCD_SERIAL_PORT) && LCD_SERIAL_PORT == (N))
|
||||
#if ANY_SERIAL_IS(-1)
|
||||
#define USING_SERIAL_DEFAULT
|
||||
#endif
|
||||
#if ANY_SERIAL_IS(0)
|
||||
#define USING_SERIAL_0 1
|
||||
#endif
|
||||
#if ANY_SERIAL_IS(1)
|
||||
#define USING_SERIAL_1 1
|
||||
#endif
|
||||
#if ANY_SERIAL_IS(2)
|
||||
#define USING_SERIAL_2 1
|
||||
#endif
|
||||
#if ANY_SERIAL_IS(3)
|
||||
#define USING_SERIAL_3 1
|
||||
#endif
|
||||
#if ANY_SERIAL_IS(4)
|
||||
#define USING_SERIAL_4 1
|
||||
#endif
|
||||
#if ANY_SERIAL_IS(5)
|
||||
#define USING_SERIAL_5 1
|
||||
#endif
|
||||
#if ANY_SERIAL_IS(6)
|
||||
#define USING_SERIAL_6 1
|
||||
#endif
|
||||
#if ANY_SERIAL_IS(7)
|
||||
#define USING_SERIAL_7 1
|
||||
#endif
|
||||
#if ANY_SERIAL_IS(8)
|
||||
#define USING_SERIAL_8 1
|
||||
#endif
|
||||
#undef ANY_SERIAL_IS
|
||||
|
||||
Reference in New Issue
Block a user