[LPC176x] Emergency Parser Feature (#10516)
This commit is contained in:
committed by
Scott Lahteine
parent
eef0248a1c
commit
2242b98248
@ -39,6 +39,11 @@ 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;
|
||||
/*----------------------------------------------------------------------------
|
||||
@ -52,6 +57,9 @@ uint32_t CDC_WrOutBuf(const char *buffer, uint32_t *length) {
|
||||
bytesWritten = bytesToWrite;
|
||||
|
||||
while (bytesToWrite) {
|
||||
#if ENABLED(EMERGENCY_PARSER)
|
||||
emergency_parser.update(*buffer);
|
||||
#endif
|
||||
usb_serial.receive_buffer.write(*buffer++); // Copy Data to buffer
|
||||
bytesToWrite--;
|
||||
}
|
||||
|
Reference in New Issue
Block a user