mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-16 07:23:07 +01:00
allow to start m5 atom s3 without USB device connected
This commit is contained in:
@@ -23,6 +23,12 @@ class GwSocketServer;
|
||||
class GwTcpClient;
|
||||
class GwChannelList{
|
||||
private:
|
||||
class SerialWrapperBase{
|
||||
public:
|
||||
virtual void begin(GwLog* logger,unsigned long baud, uint32_t config=SERIAL_8N1, int8_t rxPin=-1, int8_t txPin=-1)=0;
|
||||
virtual Stream *getStream()=0;
|
||||
virtual int getId()=0;
|
||||
};
|
||||
GwLog *logger;
|
||||
GwConfigHandler *config;
|
||||
typedef std::vector<GwChannel *> ChannelList;
|
||||
@@ -30,8 +36,8 @@ class GwChannelList{
|
||||
std::map<int,String> modes;
|
||||
GwSocketServer *sockets;
|
||||
GwTcpClient *client;
|
||||
void addSerial(HardwareSerial *stream,int id,const String &mode,int rx,int tx);
|
||||
void addSerial(HardwareSerial *stream,int id,int type,int rx,int tx);
|
||||
void addSerial(SerialWrapperBase *stream,const String &mode,int rx,int tx);
|
||||
void addSerial(SerialWrapperBase *stream,int type,int rx,int tx);
|
||||
public:
|
||||
void addSerial(int id, int rx, int tx, int type);
|
||||
GwChannelList(GwLog *logger, GwConfigHandler *config);
|
||||
|
||||
Reference in New Issue
Block a user