SerialIO
Loading...
Searching...
No Matches
SerialIO Class Referenceabstract

Class that stores state and functions for initialising and decoding rc protocol. More...

#include <SerialIO.h>

Inheritance diagram for SerialIO:
[legend]

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.
 

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
 

Detailed Description

Class that stores state and functions for initialising and decoding rc protocol.

Constructor & Destructor Documentation

◆ SerialIO()

SerialIO::SerialIO ( Stream * rxPort,
int rxPin,
int txPin,
bool inverted )

Constructor for the SerialIO class.

Initializes the pins and sets up the serial port.

Parameters
rxPortPointer to the hardware serial port to use.
rxPinThe RX pin number.
txPinThe TX pin number.
invertedWhether the serial signal is inverted (true) or not (false).

Member Function Documentation

◆ begin()

virtual void SerialIO::begin ( )
pure virtual

Initialises the pins and setup serial port.

Implemented in crsf, fport, ibus, and sbus.

◆ getChannel()

virtual void SerialIO::getChannel ( rc_channels_t * channelData)
pure virtual

Get the ChannelData.

Implemented in crsf, fport, ibus, and sbus.

◆ processIncoming()

virtual void SerialIO::processIncoming ( )
pure virtual

decode the incoming serial data.

Implemented in crsf, fport, ibus, and sbus.


The documentation for this class was generated from the following files: