[2.0.x] Emergency parser for multiple serial ports (#10524)
This commit is contained in:
@ -39,12 +39,6 @@ unsigned short CDC_DepInEmpty = 1; // Data IN EP is empty
|
||||
unsigned short CDC_LineState = 0;
|
||||
unsigned short CDC_SerialState = 0;
|
||||
|
||||
#include "../../../../../Marlin/src/inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(EMERGENCY_PARSER)
|
||||
#include "../../../../../Marlin/src/feature/emergency_parser.h"
|
||||
#endif
|
||||
|
||||
extern HalSerial usb_serial;
|
||||
/*----------------------------------------------------------------------------
|
||||
write data to CDC_OutBuf
|
||||
@ -58,7 +52,7 @@ uint32_t CDC_WrOutBuf(const char *buffer, uint32_t *length) {
|
||||
|
||||
while (bytesToWrite) {
|
||||
#if ENABLED(EMERGENCY_PARSER)
|
||||
emergency_parser.update(*buffer);
|
||||
emergency_parser.update(usb_serial.emergency_state, *buffer);
|
||||
#endif
|
||||
usb_serial.receive_buffer.write(*buffer++); // Copy Data to buffer
|
||||
bytesToWrite--;
|
||||
|
Reference in New Issue
Block a user