mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-24 15:40:31 +08:00
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:
@@ -84,6 +84,11 @@ ssize_t Serial::write(const void *buffer, size_t buffer_size)
|
||||
return _impl.write(buffer, buffer_size);
|
||||
}
|
||||
|
||||
void Serial::flush()
|
||||
{
|
||||
return _impl.flush();
|
||||
}
|
||||
|
||||
uint32_t Serial::getBaudrate() const
|
||||
{
|
||||
return _impl.getBaudrate();
|
||||
@@ -134,6 +139,34 @@ bool Serial::setFlowcontrol(FlowControl flowcontrol)
|
||||
return _impl.setFlowcontrol(flowcontrol);
|
||||
}
|
||||
|
||||
bool Serial::getSingleWireMode() const
|
||||
{
|
||||
return _impl.getSingleWireMode();
|
||||
}
|
||||
bool Serial::setSingleWireMode()
|
||||
{
|
||||
return _impl.setSingleWireMode();
|
||||
}
|
||||
|
||||
bool Serial::getSwapRxTxMode() const
|
||||
{
|
||||
return _impl.getSwapRxTxMode();
|
||||
}
|
||||
bool Serial::setSwapRxTxMode()
|
||||
{
|
||||
return _impl.setSwapRxTxMode();
|
||||
}
|
||||
|
||||
bool Serial::getInvertedMode() const
|
||||
{
|
||||
return _impl.getInvertedMode();
|
||||
}
|
||||
|
||||
bool Serial::setInvertedMode(bool enable)
|
||||
{
|
||||
return _impl.setInvertedMode(enable);
|
||||
}
|
||||
|
||||
const char *Serial::getPort() const
|
||||
{
|
||||
return _impl.getPort();
|
||||
|
||||
Reference in New Issue
Block a user