SerialIO
Loading...
Searching...
No Matches
ibus.h
Go to the documentation of this file.
1
6#pragma once
7#ifndef IBUS_H
8#define IBUS_H
9
10#include "../SerialIO.h" // Include header file for the serial IO class
11#include "ibus_protocol.h"
12
16class ibus : public SerialIO {
17private:
18 ibus_channels_t _channelData;
19 uint8_t _rxData[IBUS_MAX_PACKET_SIZE];
20 bool checkSum();
21
22public:
31 explicit ibus(Stream *rxPort, int rxPin = -1, int txPin = -1,
32 bool inverted = false);
33
37 void begin() override;
38
42 void processIncoming() override;
43
49 void getChannel(rc_channels_t *channelData) override;
50};
51
52#endif // IBUS_H
Header file for serial input/output (IO) functionality.
Class that stores state and functions for initialising and decoding rc protocol.
Definition SerialIO.h:36
A class for handling IBUS protocol communication.
Definition ibus.h:16
ibus(Stream *rxPort, int rxPin=-1, int txPin=-1, bool inverted=false)
Constructor for the IBUS class.
Definition ibus.cpp:3
void getChannel(rc_channels_t *channelData) override
Gets the decoded RC channels from the IBUS data.
Definition ibus.cpp:51
void begin() override
Initializes the IBUS communication.
Definition ibus.cpp:6
void processIncoming() override
Processes incoming IBUS data.
Definition ibus.cpp:24
Header file for the iBus protocol implementation.
#define IBUS_MAX_PACKET_SIZE
Maximum packet size for the IBUS protocol.
Definition ibus_protocol.h:17
Definition ibus_protocol.h:22
Definition SerialIO.h:11