[LPC176x] Emergency Parser Feature (#10516)

This commit is contained in:
Chris Pepper authored and Scott Lahteine committed 2018-04-25 06:44:26 -05:00
1 parent eef0248a1c
commit 2242b98248
15 files changed
+216 -219

No files matched your search

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