SerialIO
Loading...
Searching...
No Matches
sbus Class Reference

A class for handling SBUS protocol communication. More...

#include <sbus.h>

Inheritance diagram for sbus:
[legend]
Collaboration diagram for sbus:
[legend]

Public Member Functions

 sbus (Stream *rxPort, int rxPin=-1, int txPin=-1, bool inverted=true)
 Constructor for the SBUS class.
 
void begin () override
 Initializes the SBUS communication.
 
void processIncoming () override
 Processes incoming SBUS data.
 
void getChannel (rc_channels_t *channelData) override
 Gets the decoded RC channels from the SBUS data.
 
- Public Member Functions inherited from SerialIO
 SerialIO (Stream *rxPort, int rxPin, int txPin, bool inverted)
 Constructor for the SerialIO class.
 

Additional Inherited Members

- Protected Member Functions inherited from SerialIO
void leftShift (uint8_t arr[], size_t size)
 
void rightShift (uint8_t arr[], size_t size)
 
- Protected Attributes inherited from SerialIO
Stream * _rxPort
 
bool _inverted
 
int _rxPin
 
int _txPin
 

Detailed Description

A class for handling SBUS protocol communication.

Constructor & Destructor Documentation

◆ sbus()

sbus::sbus ( Stream * rxPort,
int rxPin = -1,
int txPin = -1,
bool inverted = true )
explicit

Constructor for the SBUS class.

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

Member Function Documentation

◆ begin()

void sbus::begin ( )
overridevirtual

Initializes the SBUS communication.

Implements SerialIO.

◆ getChannel()

void sbus::getChannel ( rc_channels_t * channelData)
overridevirtual

Gets the decoded RC channels from the SBUS data.

Parameters
channelDataPointer to a crsf_channels_t struct where the decoded channel data will be stored.

Implements SerialIO.

◆ processIncoming()

void sbus::processIncoming ( )
overridevirtual

Processes incoming SBUS data.

Implements SerialIO.


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