#ifndef SERIAL_H #define SERIAL_H #define BAUD 38400 #define BUFFER_SIZE 128 #include #include #include #include #include #include class Serial { private: char _terminator = '\n'; uint16_t _rxIndex=0; public: Serial(); void putChar(const char c); void write(const char* in, const unsigned int length); void write(const char in[]); void write_p(const char in[]); //for flash space strigns void write(const int32_t in); bool dataIsWaiting(); char getChar(); unsigned int getString(char* buffer, const int bufferLength); void flush(); void setTerminator(const char terminator); }; #endif