diff --git a/src/SoftwareSerial.cpp b/src/SoftwareSerial.cpp index 23e40b6..163e3a3 100644 --- a/src/SoftwareSerial.cpp +++ b/src/SoftwareSerial.cpp @@ -102,7 +102,7 @@ void UARTBase::beginRx(bool hasPullUp, int bufCapacity, int isrBufCapacity) { m_parityBuffer.reset(new circular_queue((m_buffer->capacity() + 7) / 8)); m_parityInPos = m_parityOutPos = 1; } - m_isrBuffer.reset(new circular_queue_mp((isrBufCapacity > 0) ? + m_isrBuffer.reset(new circular_queue((isrBufCapacity > 0) ? isrBufCapacity : m_buffer->capacity() * (2 + m_dataBits + static_cast(m_parityMode)))); if (m_buffer && (!m_parityMode || m_parityBuffer) && m_isrBuffer) { m_rxValid = true; @@ -616,8 +616,4 @@ template void IRAM_ATTR delegate::detail::DelegateImpl::operator()( template size_t IRAM_ATTR circular_queue::available() const; template bool IRAM_ATTR circular_queue::push(uint32_t&&); template bool IRAM_ATTR circular_queue::push(const uint32_t&); -template size_t IRAM_ATTR circular_queue_mp::available() const; -template bool IRAM_ATTR circular_queue_mp::push(uint32_t&&); -template bool IRAM_ATTR circular_queue_mp::push(const uint32_t&); - diff --git a/src/SoftwareSerial.h b/src/SoftwareSerial.h index 6e7e13a..9139e2b 100644 --- a/src/SoftwareSerial.h +++ b/src/SoftwareSerial.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #ifndef __SoftwareSerial_h #define __SoftwareSerial_h -#include "circular_queue/circular_queue_mp.h" +#include "circular_queue/circular_queue.h" #include namespace EspSoftwareSerial { @@ -365,7 +365,7 @@ class UARTBase : public Stream { #endif // the ISR stores the relative bit times in the buffer. The inversion corrected level is used as sign bit (2's complement): // 1 = positive including 0, 0 = negative. - std::unique_ptr > m_isrBuffer; + std::unique_ptr > m_isrBuffer; const Delegate m_isrBufferForEachDel { [](UARTBase* self, uint32_t&& isrTick) { self->rxBits(isrTick); }, this }; std::atomic m_isrOverflow { false }; uint32_t m_isrLastTick; @@ -442,9 +442,6 @@ extern template void delegate::detail::DelegateImpl::operator()() c extern template size_t circular_queue::available() const; extern template bool circular_queue::push(uint32_t&&); extern template bool circular_queue::push(const uint32_t&); -extern template size_t circular_queue_mp::available() const; -extern template bool circular_queue_mp::push(uint32_t&&); -extern template bool circular_queue_mp::push(const uint32_t&); #endif // __SoftwareSerial_h