IO RXbuffer now uses template RingBuffer

This commit is contained in:
Geoffrey Merck
2020-05-09 17:35:38 +02:00
parent 6c3dd265ab
commit 26a703c68c
8 changed files with 27 additions and 13 deletions
+14 -1
View File
@@ -24,6 +24,19 @@
#include "SampleRB.h"
#include "RingBuffer.h"
struct TSample {
volatile uint16_t sample;
volatile uint8_t control;
TSample operator=(const volatile TSample& other) volatile {
return {other.sample, other.control};
}
volatile TSample operator=(const TSample& other) volatile {
return {other.sample, other.control};
}
};
class CIO {
public:
CIO();
@@ -59,7 +72,7 @@ public:
private:
bool m_started;
CSampleRB m_rxBuffer;
CRingBuffer<TSample> m_rxBuffer;
CSampleRB m_txBuffer;
CRingBuffer<uint16_t> m_rssiBuffer;