SerialIO
|
Class that stores state and functions for initialising and decoding rc protocol. More...
#include <SerialIO.h>
Public Member Functions | |
SerialIO (Stream *rxPort, int rxPin, int txPin, bool inverted) | |
Constructor for the SerialIO class. | |
virtual void | begin ()=0 |
Initialises the pins and setup serial port. | |
virtual void | processIncoming ()=0 |
decode the incoming serial data. | |
virtual void | getChannel (rc_channels_t *channelData)=0 |
Get the ChannelData. | |
virtual void | getChannel (ibus_channels_t *channelData) |
Get the ChannelData. | |
Protected Member Functions | |
void | leftShift (uint8_t arr[], size_t size) |
void | rightShift (uint8_t arr[], size_t size) |
Protected Attributes | |
Stream * | _rxPort |
bool | _inverted |
int | _rxPin |
int | _txPin |
Class that stores state and functions for initialising and decoding rc protocol.
SerialIO::SerialIO | ( | Stream * | rxPort, |
int | rxPin, | ||
int | txPin, | ||
bool | inverted ) |
Constructor for the SerialIO class.
Initializes the pins and sets up the serial port.
rxPort | Pointer to the hardware serial port to use. |
rxPin | The RX pin number. |
txPin | The TX pin number. |
inverted | Whether the serial signal is inverted (true) or not (false). |
|
pure virtual |
|
virtual |
Get the ChannelData.
Reimplemented in ibus.
|
pure virtual |
|
pure virtual |