mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-08-08 22:34:59 -06:00
[2.0.x] Emergency parser for multiple serial ports (#10524)
This commit is contained in:
parent
8cc31d1b2e
commit
2578996631
8 changed files with 121 additions and 106 deletions
|
@ -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--;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue