Adding Jonathan’s ring buffer to serial repeater

This commit is contained in:
Andy CA6JAU 2017-07-04 14:27:57 -04:00
parent eefda572bf
commit 6486bf4efc
4 changed files with 76 additions and 14 deletions

View file

@ -20,6 +20,7 @@
#define SERIALPORT_H
#include "Globals.h"
#include "SerialRB.h"
class CSerialPort {
public:
@ -55,6 +56,7 @@ private:
uint8_t m_ptr;
uint8_t m_len;
bool m_debug;
CSerialRB m_repeat;
void sendACK();
void sendNAK(uint8_t err);
@ -68,6 +70,7 @@ private:
// Hardware versions
void beginInt(uint8_t n, int speed);
int availableInt(uint8_t n);
int availableForWriteInt(uint8_t n);
uint8_t readInt(uint8_t n);
void writeInt(uint8_t n, const uint8_t* data, uint16_t length, bool flush = false);
};