From 5247bb11f7cc455cad780fbed8eaddd4a6dd007a Mon Sep 17 00:00:00 2001 From: Victor Oliveira Date: Fri, 16 Oct 2020 04:03:45 -0300 Subject: [PATCH] Sanity check unsupported EP (#19745) --- Marlin/src/HAL/STM32F1/inc/SanityCheck.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Marlin/src/HAL/STM32F1/inc/SanityCheck.h b/Marlin/src/HAL/STM32F1/inc/SanityCheck.h index 9d5026fbab..a0381ea8c8 100644 --- a/Marlin/src/HAL/STM32F1/inc/SanityCheck.h +++ b/Marlin/src/HAL/STM32F1/inc/SanityCheck.h @@ -51,3 +51,10 @@ #if ENABLED(NEOPIXEL_LED) #error "NEOPIXEL_LED (Adafruit NeoPixel) is not supported for HAL/STM32F1. Comment out this line to proceed at your own risk!" #endif + +// Emergency Parser needs at least one serial with HardwareSerial or USBComposite. +// The USBSerial maple don't allow any hook to implement EMERGENCY_PARSER. +// And copy all USBSerial code to marlin space to support EMERGENCY_PARSER, when we have another options, don't worth it. +#if ENABLED(EMERGENCY_PARSER) && !defined(USE_USB_COMPOSITE) && ((SERIAL_PORT == -1 && !defined(SERIAL_PORT_2)) || (SERIAL_PORT_2 == -1 && !defined(SERIAL_PORT))) + #error "EMERGENCY_PARSER is only supported by HardwareSerial or USBComposite in HAL/STM32F1." +#endif