mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 12:13:35 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user