mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-08-09 06:45:07 -06:00
[LPC176x] Emergency Parser Feature (#10516)
This commit is contained in:
parent
eef0248a1c
commit
2242b98248
15 changed files with 216 additions and 219 deletions
|
@ -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--;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue