Added Sate output

This commit is contained in:
IMback
2017-11-05 17:37:21 +01:00
parent b4d1844b68
commit 21b636aa98
48 changed files with 1363 additions and 3742 deletions

View File

@ -1,25 +1,29 @@
#ifndef SERIAL_H
#define SERIAL_H
#define BAUD 38400
#define BUFFER_SIZE 128
#define BAUD 19200
#define BUFFER_SIZE 1024
#include <util/setbaud.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include <string.h>
#include <stdlib.h>
const bool serialFlowControl = false;
class Serial
{
private:
char _terminator = '\n';
uint16_t _rxIndex=0;
public:
Serial();
void putChar(const char c);
void putString(const char* in, const unsigned int length);
void putString(const char in[]);
void write(const char* in, const unsigned int length);
void write(const char in[]);
void write(const int32_t in);
bool dataIsWaiting();
char getChar();
unsigned int getString(char* buffer, const int bufferLength);