A class for handling CRSF protocol communication.
More...
#include <crsf.h>
|
| crsf (Stream *rxPort, int rxPin=-1, int txPin=-1, bool inverted=false) |
| Constructor for the CRSF class.
|
|
void | begin () override |
| Initializes the CRSF communication.
|
|
void | processIncoming () override |
| Processes incoming CRSF data.
|
|
void | getChannel (rc_channels_t *channelData) override |
| Retrieves the decoded RC channels from the received CRSF data.
|
|
uint8_t | crc8 (uint8_t *data, uint8_t len) |
|
| SerialIO (Stream *rxPort, int rxPin, int txPin, bool inverted) |
| Constructor for the SerialIO class.
|
|
|
void | leftShift (uint8_t arr[], size_t size) |
|
void | rightShift (uint8_t arr[], size_t size) |
|
Stream * | _rxPort |
|
bool | _inverted |
|
int | _rxPin |
|
int | _txPin |
|
A class for handling CRSF protocol communication.
◆ crsf()
crsf::crsf |
( |
Stream * | rxPort, |
|
|
int | rxPin = -1, |
|
|
int | txPin = -1, |
|
|
bool | inverted = false ) |
|
explicit |
Constructor for the CRSF class.
- Parameters
-
rxPort | Reference to the hardware serial port for RX communication. |
rxPin | The RX pin number. |
txPin | The TX pin number. |
inverted | Whether the serial signal is inverted (true) or not (false). |
◆ begin()
Initializes the CRSF communication.
Implements SerialIO.
◆ getChannel()
Retrieves the decoded RC channels from the received CRSF data.
- Parameters
-
channelData | Pointer to a crsf_channels_t struct where the decoded channel data will be stored. |
Implements SerialIO.
◆ processIncoming()
void crsf::processIncoming |
( |
| ) |
|
|
overridevirtual |
Processes incoming CRSF data.
Implements SerialIO.
The documentation for this class was generated from the following files:
- src/crsf/crsf.h
- src/crsf/crsf.cpp