Buffer no longer volatile, not needed

This commit is contained in:
Geoffrey Merck 2020-05-10 00:03:32 +02:00
parent 55df5fe04c
commit 16c3d418eb
2 changed files with 19 additions and 8 deletions

View file

@ -47,15 +47,17 @@
template <typename TDATATYPE>
class CRingBuffer {
public:
CRingBuffer(uint16_t length);
CRingBuffer(uint16_t length = 370U);
uint16_t getSpace() const;
uint16_t getData() const;
bool put(const volatile TDATATYPE item) volatile;
bool put(TDATATYPE item) volatile;
bool get(volatile TDATATYPE& item) volatile;
bool get(TDATATYPE& item);
TDATATYPE get();
TDATATYPE peek() const;
@ -65,7 +67,7 @@ public:
private:
uint16_t m_length;
volatile TDATATYPE* m_buffer;
TDATATYPE* m_buffer;
volatile uint16_t m_head;
volatile uint16_t m_tail;
volatile bool m_full;