1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-16 07:23:07 +01:00

using the externals for USBSerial and Serial1

This commit is contained in:
andreas
2023-08-30 19:55:26 +02:00
parent ac91aeb491
commit dc2f353893
4 changed files with 21 additions and 21 deletions

View File

@@ -10,19 +10,17 @@ class GwSerial : public GwChannelInterface{
GwBuffer *buffer;
GwBuffer *readBuffer=NULL;
GwLog *logger;
int num;
bool initialized=false;
bool allowRead=true;
GwBuffer::WriteStatus write();
int id=-1;
int overflows=0;
size_t enqueue(const uint8_t *data, size_t len,bool partial=false);
HardwareSerial *serial;
Stream *serial;
public:
static const int bufferSize=200;
GwSerial(GwLog *logger,int num,int id,bool allowRead=true);
GwSerial(GwLog *logger,Stream *stream,int id,bool allowRead=true);
~GwSerial();
int setup(int baud,int rxpin,int txpin);
bool isInitialized();
virtual size_t sendToClients(const char *buf,int sourceId,bool partial=false);
virtual void loop(bool handleRead=true,bool handleWrite=true);