improved serial handeling added aux state info
This commit is contained in:
5
serial.h
5
serial.h
@ -2,7 +2,7 @@
|
||||
#define SERIAL_H
|
||||
|
||||
#define BAUD 38400
|
||||
#define BUFFER_SIZE 128
|
||||
#define SERIAL_BUFFER_SIZE 128
|
||||
|
||||
#include <util/setbaud.h>
|
||||
#include <avr/io.h>
|
||||
@ -11,12 +11,12 @@
|
||||
#include <stdlib.h>
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
const bool serialFlowControl = false;
|
||||
|
||||
class Serial
|
||||
{
|
||||
private:
|
||||
char _terminator = '\n';
|
||||
uint16_t _rxIndex=0;
|
||||
|
||||
public:
|
||||
Serial();
|
||||
@ -25,6 +25,7 @@ public:
|
||||
void write(const char in[]);
|
||||
void write_p(const char in[]); //for flash space strigns
|
||||
void write(const int32_t in);
|
||||
unsigned int read( char* buffer, const unsigned int length );
|
||||
bool dataIsWaiting();
|
||||
char getChar();
|
||||
unsigned int getString(char* buffer, const int bufferLength);
|
||||
|
Reference in New Issue
Block a user