Changed static .data strings to PSTR(), removed oom situation

This commit is contained in:
IMback
2017-11-09 21:19:06 +01:00
parent 73f1bf57ae
commit 1cbff35a33
6 changed files with 79 additions and 90 deletions

View File

@ -2,27 +2,28 @@
#define SERIAL_H
#define BAUD 38400
#define BUFFER_SIZE 1024
#define BUFFER_SIZE 128
#include <util/setbaud.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include <string.h>
#include <stdlib.h>
#include <avr/pgmspace.h>
const bool serialFlowControl = false;
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[]);
void write(const int32_t in);
bool dataIsWaiting();
char getChar();