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
+2 -2
View File
@@ -56,7 +56,7 @@ template <typename TDATATYPE> uint16_t CRingBuffer<TDATATYPE>::getData() const
return m_length - m_tail + m_head;
}
template <typename TDATATYPE> bool CRingBuffer<TDATATYPE>::put(const TDATATYPE sample)
template <typename TDATATYPE> bool CRingBuffer<TDATATYPE>::put(const TDATATYPE sample) volatile
{
if (m_full) {
m_overflow = true;
@@ -80,7 +80,7 @@ template <typename TDATATYPE> TDATATYPE CRingBuffer<TDATATYPE>::peek() const
return m_buffer[m_tail];
}
template <typename TDATATYPE> bool CRingBuffer<TDATATYPE>::get(TDATATYPE& item)
template <typename TDATATYPE> bool CRingBuffer<TDATATYPE>::get(volatile TDATATYPE& item) volatile
{
if (m_head == m_tail && !m_full)
return false;