Skip to content

Commit 7a14d3e

Browse files
committed
Revert to non-MP circular queue.
1 parent 1d915c6 commit 7a14d3e

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

src/SoftwareSerial.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ void UARTBase::beginRx(bool hasPullUp, int bufCapacity, int isrBufCapacity) {
102102
m_parityBuffer.reset(new circular_queue<uint8_t>((m_buffer->capacity() + 7) / 8));
103103
m_parityInPos = m_parityOutPos = 1;
104104
}
105-
m_isrBuffer.reset(new circular_queue_mp<uint32_t, UARTBase*>((isrBufCapacity > 0) ?
105+
m_isrBuffer.reset(new circular_queue<uint32_t, UARTBase*>((isrBufCapacity > 0) ?
106106
isrBufCapacity : m_buffer->capacity() * (2 + m_dataBits + static_cast<bool>(m_parityMode))));
107107
if (m_buffer && (!m_parityMode || m_parityBuffer) && m_isrBuffer) {
108108
m_rxValid = true;
@@ -616,8 +616,4 @@ template void IRAM_ATTR delegate::detail::DelegateImpl<void*, void>::operator()(
616616
template size_t IRAM_ATTR circular_queue<uint32_t, UARTBase*>::available() const;
617617
template bool IRAM_ATTR circular_queue<uint32_t, UARTBase*>::push(uint32_t&&);
618618
template bool IRAM_ATTR circular_queue<uint32_t, UARTBase*>::push(const uint32_t&);
619-
template size_t IRAM_ATTR circular_queue_mp<uint32_t, UARTBase*>::available() const;
620-
template bool IRAM_ATTR circular_queue_mp<uint32_t, UARTBase*>::push(uint32_t&&);
621-
template bool IRAM_ATTR circular_queue_mp<uint32_t, UARTBase*>::push(const uint32_t&);
622-
623619

src/SoftwareSerial.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2222
#ifndef __SoftwareSerial_h
2323
#define __SoftwareSerial_h
2424

25-
#include "circular_queue/circular_queue_mp.h"
25+
#include "circular_queue/circular_queue.h"
2626
#include <Stream.h>
2727

2828
namespace EspSoftwareSerial {
@@ -365,7 +365,7 @@ class UARTBase : public Stream {
365365
#endif
366366
// the ISR stores the relative bit times in the buffer. The inversion corrected level is used as sign bit (2's complement):
367367
// 1 = positive including 0, 0 = negative.
368-
std::unique_ptr<circular_queue_mp<uint32_t, UARTBase*> > m_isrBuffer;
368+
std::unique_ptr<circular_queue<uint32_t, UARTBase*> > m_isrBuffer;
369369
const Delegate<void(uint32_t&&), UARTBase*> m_isrBufferForEachDel { [](UARTBase* self, uint32_t&& isrTick) { self->rxBits(isrTick); }, this };
370370
std::atomic<bool> m_isrOverflow { false };
371371
uint32_t m_isrLastTick;
@@ -442,9 +442,6 @@ extern template void delegate::detail::DelegateImpl<void*, void>::operator()() c
442442
extern template size_t circular_queue<uint32_t, EspSoftwareSerial::UARTBase*>::available() const;
443443
extern template bool circular_queue<uint32_t, EspSoftwareSerial::UARTBase*>::push(uint32_t&&);
444444
extern template bool circular_queue<uint32_t, EspSoftwareSerial::UARTBase*>::push(const uint32_t&);
445-
extern template size_t circular_queue_mp<uint32_t, EspSoftwareSerial::UARTBase*>::available() const;
446-
extern template bool circular_queue_mp<uint32_t, EspSoftwareSerial::UARTBase*>::push(uint32_t&&);
447-
extern template bool circular_queue_mp<uint32_t, EspSoftwareSerial::UARTBase*>::push(const uint32_t&);
448445

449446
#endif // __SoftwareSerial_h
450447

0 commit comments

Comments
 (0)