allow to start m5 atom s3 without USB device connected

This commit is contained in:
andreas committed 2024-03-23 20:21:21 +01:00
1 parent 5b0b8ba799
commit d27e811317
5 files changed
+103 -30

No files matched your search

+5 -3
View File
@@ -16,17 +16,19 @@ class GwSerial : public GwChannelInterface{
int id=-1;
int overflows=0;
size_t enqueue(const uint8_t *data, size_t len,bool partial=false);
HardwareSerial *serial;
Stream *serial;
bool availableWrite=false; //if this is false we will wait for availabkleWrite until we flush again
public:
static const int bufferSize=200;
GwSerial(GwLog *logger,HardwareSerial *stream,int id,bool allowRead=true);
GwSerial(GwLog *logger,Stream *stream,int id,bool allowRead=true);
~GwSerial();
bool isInitialized();
virtual size_t sendToClients(const char *buf,int sourceId,bool partial=false);
virtual void loop(bool handleRead=true,bool handleWrite=true);
virtual void readMessages(GwMessageFetcher *writer);
void flush();
bool flush(long millis=200);
virtual Stream *getStream(bool partialWrites);
bool getAvailableWrite(){return availableWrite;}
friend GwSerialStream;
};
#endif