openledrace/open-led-race/SerialCommand.h
Luca Borsari 60294709c7 Ver 0.9.6
2020-12-12 17:29:55 +01:00

29 lines
524 B
C++

#ifndef SerialCommand_h
#define SerialCommand_h
#include <Arduino.h>
class SerialCommand {
public:
SerialCommand();
SerialCommand(char *buf, int bufLen, char eoc, Stream* stream);
void init(char *buf, int bufLen, char eoc, Stream* stream);
int checkSerial(void);
void sendCommand(char *);
int overflow;
protected:
Stream* _stream;
char *_buf;
int _bufIdx;
int _bufLen;
char _eoc; // EndOfCommand char
bool _initialized;
};
#endif