|
Arduino PulseWire Transceiver Library
|
High-performance ESP32 IR RX driver using the RMT peripheral and Manchester decoding. More...
#include <RxDriverESP32.h>


Public Member Functions | |
| RxDriverESP32 (ManchesterCodec &codec, uint8_t pin, uint32_t freqHz=DEFAULT_BIT_FREQ_HZ, bool useChecksum=false, uint32_t timeoutUs=5000) | |
| void | setFrameSize (uint8_t size) override |
| void | setRxBufferSize (size_t size) override |
| Set the size of the internal RX buffer. | |
| bool | begin (uint8_t frameSize) override |
| bool | begin () override |
| void | end () override |
| Stop the receiver. | |
| size_t | readBytes (uint8_t *buffer, size_t length) override |
| int | available () override |
| Get the number of bytes available in the internal buffer. | |
| virtual void | setFrameSize (uint16_t size)=0 |
| Set the expected frame size for dynamic data reception. | |
| virtual bool | begin (uint16_t bitFrequencyHz)=0 |
| Start the receiver. | |
Static Protected Member Functions | |
| static void | rxTask (void *arg) |
| FreeRTOS task for receiving and decoding IR frames using ESP32 RMT. | |
Protected Attributes | |
| size_t | _rxBufferSize = 256 |
| uint8_t | _rxPin |
| uint16_t | _frameSize = DEFAULT_FRAME_SIZE |
| uint32_t | _freqHz |
| rmt_channel_handle_t | _rxChannel = nullptr |
| TaskHandle_t | _taskHandle = nullptr |
| volatile bool | _stopTask = false |
| uint16_t | _preambleBits = 0 |
| bool | _inFrame = false |
| QueueHandle_t | _frameQueue = nullptr |
| RingBuffer< uint8_t > | rxOverflow |
| ManchesterCodec & | _codec |
| Vector< uint8_t > | manchesterBits |
| bool | _useChecksum = false |
| uint32_t | _timeoutUs = 5000 |
| uint32_t | _lastSymbolTime = 0 |
High-performance ESP32 IR RX driver using the RMT peripheral and Manchester decoding.
Definition at line 43 of file RxDriverESP32.h.
|
inline |
| codec | IR codec |
| pin | RX pin |
| freqHz | Bit frequency |
| useChecksum | If true, validate checksum (default: false) |
| timeoutUs | Timeout in microseconds to flush frame if no symbol received (default: 5000) |
Definition at line 52 of file RxDriverESP32.h.
|
inlineoverridevirtual |
Get the number of bytes available in the internal buffer.
Implements pulsewire::RxDriver.
Definition at line 159 of file RxDriverESP32.h.
|
inlineoverride |
Definition at line 67 of file RxDriverESP32.h.
Start the receiver.
Implemented in pulsewire::RxDriverArduino.
Definition at line 62 of file RxDriverESP32.h.
|
inlineoverridevirtual |
Read up to 'size' bytes from the internal buffer into 'data'. Returns number of bytes read.
Implements pulsewire::RxDriver.
Definition at line 130 of file RxDriverESP32.h.
FreeRTOS task for receiving and decoding IR frames using ESP32 RMT.
This method is protocol-agnostic: it processes each RMT symbol by summing durations and inferring the logic level, then passes these to the codec's decodeEdge method. As long as the codec implements decodeEdge for its protocol, this works for Manchester, PulseWidth, PulseDistance, etc.
| arg | Pointer to RxDriverESP32 instance. |
Definition at line 192 of file RxDriverESP32.h.
Set the expected frame size for dynamic data reception.
Implemented in pulsewire::RxDriverArduino.
Definition at line 58 of file RxDriverESP32.h.
Set the size of the internal RX buffer.
Implements pulsewire::RxDriver.
Definition at line 60 of file RxDriverESP32.h.
|
protected |
Definition at line 176 of file RxDriverESP32.h.
|
protected |
Definition at line 174 of file RxDriverESP32.h.
|
protected |
Definition at line 167 of file RxDriverESP32.h.
|
protected |
Definition at line 168 of file RxDriverESP32.h.
Definition at line 173 of file RxDriverESP32.h.
|
protected |
Definition at line 180 of file RxDriverESP32.h.
|
protected |
Definition at line 172 of file RxDriverESP32.h.
|
protected |
Definition at line 165 of file RxDriverESP32.h.
|
protected |
Definition at line 169 of file RxDriverESP32.h.
|
protected |
Definition at line 166 of file RxDriverESP32.h.
Definition at line 171 of file RxDriverESP32.h.
|
protected |
Definition at line 170 of file RxDriverESP32.h.
|
protected |
Definition at line 179 of file RxDriverESP32.h.
Definition at line 178 of file RxDriverESP32.h.
Definition at line 177 of file RxDriverESP32.h.
|
protected |
Definition at line 175 of file RxDriverESP32.h.