|
Arduino PulseWire Transceiver Library
|
Receiver class for communication. More...
#include <Transceiver.h>


Public Member Functions | |
| Receiver (RxDriver &rx) | |
| void | setRxDriver (RxDriver *driver) |
| Set the RX driver. | |
| void | setTxDriver (TxDriver *driver) |
| Set the TX driver. | |
| void | setFrameSize (uint16_t size) |
| Set the expected maximum frame size for RX/TX drivers and single-char buffer. | |
| bool | setFramingMode (FramingMode mode) |
| bool | begin (uint16_t bitFrequencyHz=DEFAULT_BIT_FREQ_HZ) |
| Initialize the transceiver and drivers. | |
| void | end () |
| End/stop the RX driver. | |
| size_t | write (uint8_t byte) override |
| Write a single byte to the TX driver. | |
| size_t | write (const uint8_t *buffer, size_t size) override |
| Write a buffer to the TX driver. | |
| void | flush () override |
| Not implemented. | |
| int | availableForWrite () override |
| Return the number of bytes available for writing (always 1024) | |
| int | available () override |
| Return the number of bytes available to read. | |
| int | read () override |
| Read a single byte from the buffer. | |
| virtual size_t | readBytes (uint8_t *buffer, size_t length) |
| Read bytes into the provided buffer, up to the specified length. | |
| int | peek () override |
| Peek at the next byte in the buffer without removing it. | |
Protected Member Functions | |
| void | refillSingleCharBuffer () |
Protected Attributes | |
| RxDriver * | _rxDriver = nullptr |
| TxDriver * | _txDriver = nullptr |
| RingBuffer< uint8_t > | _singleCharRxBuffer {64} |
| int | _frameSize = 0 |
Receiver class for communication.
The Receiver class is a specialized version of the Transceiver class designed for reception-only operations. It provides a simplified interface for receiving IR signals using an RX driver.
Definition at line 246 of file Transceiver.h.
|
inline |
Definition at line 248 of file Transceiver.h.
|
inlineoverrideinherited |
Return the number of bytes available to read.
Definition at line 170 of file Transceiver.h.
|
inlineoverrideinherited |
Return the number of bytes available for writing (always 1024)
Definition at line 165 of file Transceiver.h.
Initialize the transceiver and drivers.
Definition at line 109 of file Transceiver.h.
|
inlineinherited |
End/stop the RX driver.
Definition at line 134 of file Transceiver.h.
|
inlineoverrideinherited |
Not implemented.
Definition at line 156 of file Transceiver.h.
|
inlineoverrideinherited |
Peek at the next byte in the buffer without removing it.
Definition at line 204 of file Transceiver.h.
|
inlineoverrideinherited |
Read a single byte from the buffer.
Definition at line 177 of file Transceiver.h.
|
inlinevirtualinherited |
Read bytes into the provided buffer, up to the specified length.
| buffer | |
| length |
Definition at line 191 of file Transceiver.h.
|
inlineprotectedinherited |
Definition at line 215 of file Transceiver.h.
Set the expected maximum frame size for RX/TX drivers and single-char buffer.
Definition at line 86 of file Transceiver.h.
|
inlineinherited |
Definition at line 98 of file Transceiver.h.
Set the RX driver.
Definition at line 75 of file Transceiver.h.
Set the TX driver.
Definition at line 80 of file Transceiver.h.
|
inlineoverrideinherited |
Write a buffer to the TX driver.
Definition at line 147 of file Transceiver.h.
Write a single byte to the TX driver.
Definition at line 142 of file Transceiver.h.
|
protectedinherited |
Definition at line 213 of file Transceiver.h.
Definition at line 210 of file Transceiver.h.
|
protectedinherited |
Definition at line 212 of file Transceiver.h.
Definition at line 211 of file Transceiver.h.