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
+37
View File
@@ -255,6 +255,11 @@ ssize_t SerialImpl::write(const void *buffer, size_t buffer_size)
return ret_write;
}
void SerialImpl::flush()
{
// TODO: Flush not implemented yet on Qurt
}
const char *SerialImpl::getPort() const
{
return _port;
@@ -348,4 +353,36 @@ bool SerialImpl::setFlowcontrol(FlowControl flowcontrol)
return flowcontrol == FlowControl::Disabled;
}
bool SerialImpl::getSingleWireMode() const
{
return false;
}
bool SerialImpl::setSingleWireMode()
{
// Qurt platform does not support single wire mode
return false;
}
bool SerialImpl::getSwapRxTxMode() const
{
return false;
}
bool SerialImpl::setSwapRxTxMode()
{
// Qurt platform does not support swap rx tx mode
return false;
}
bool SerialImpl::setInvertedMode(bool enable)
{
// Qurt platform does not support inverted mode
return false == enable;
}
bool SerialImpl::getInvertedMode() const
{
return false;
}
} // namespace device