mirror of
https://github.com/g4klx/MMDVM.git
synced 2026-08-21 14:36:21 +02:00
IO RXbuffer now uses template RingBuffer
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user