[2.0.x] Emergency parser for multiple serial ports (#10524)
This commit is contained in:
@@ -23,6 +23,11 @@
|
||||
#ifndef HARDWARE_SERIAL_H_
|
||||
#define HARDWARE_SERIAL_H_
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
#if ENABLED(EMERGENCY_PARSER)
|
||||
#include "../../feature/emergency_parser.h"
|
||||
#endif
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <Stream.h>
|
||||
@@ -32,8 +37,6 @@ extern "C" {
|
||||
#include "lpc17xx_pinsel.h"
|
||||
}
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
class HardwareSerial : public Stream {
|
||||
private:
|
||||
LPC_UART_TypeDef *UARTx;
|
||||
@@ -48,6 +51,9 @@ private:
|
||||
uint32_t TxQueueWritePos;
|
||||
uint32_t TxQueueReadPos;
|
||||
#endif
|
||||
#if ENABLED(EMERGENCY_PARSER)
|
||||
EmergencyParser::State emergency_state;
|
||||
#endif
|
||||
|
||||
public:
|
||||
HardwareSerial(LPC_UART_TypeDef *UARTx)
|
||||
@@ -59,6 +65,9 @@ public:
|
||||
, TxQueueWritePos(0)
|
||||
, TxQueueReadPos(0)
|
||||
#endif
|
||||
#if ENABLED(EMERGENCY_PARSER)
|
||||
, emergency_state(EmergencyParser::State::EP_RESET)
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user