[LPC176x] Emergency Parser Feature (#10516)

This commit is contained in:
Chris Pepper
2018-04-25 12:44:26 +01:00
committed by Scott Lahteine
parent eef0248a1c
commit 2242b98248
15 changed files with 216 additions and 219 deletions

View File

@ -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--;
}