Port CRSF RC driver to new Serial UART API (#22917)

* Added implementations of Rx Tx swap and single wire for new UART API needed by CRSF driver
* Added inverted mode to Serial interface API
This commit is contained in:
Eric Katzfey
2024-04-01 22:09:13 -04:00
committed by GitHub
parent a9ba0acb2a
commit 8e61026511
14 changed files with 367 additions and 79 deletions
@@ -65,6 +65,8 @@ public:
ssize_t write(const void *buffer, size_t buffer_size);
void flush();
// If port is already open then the following configuration functions
// will reconfigure the port. If the port is not yet open then they will
// simply store the configuration in preparation for the port to be opened.
@@ -84,6 +86,15 @@ public:
FlowControl getFlowcontrol() const;
bool setFlowcontrol(FlowControl flowcontrol);
bool getSingleWireMode() const;
bool setSingleWireMode();
bool getSwapRxTxMode() const;
bool setSwapRxTxMode();
bool getInvertedMode() const;
bool setInvertedMode(bool enable);
static bool validatePort(const char *port);
bool setPort(const char *port);
const char *getPort() const;