mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 23:33:57 -04:00
HAL_ChibiOS: added a method for just changing port owner
This commit is contained in:
parent
a5fd60ec71
commit
0ed33653fc
@ -231,6 +231,12 @@ static int hal_console_vprintf(const char *fmt, va_list arg)
|
|||||||
|
|
||||||
void UARTDriver::_begin(uint32_t b, uint16_t rxS, uint16_t txS)
|
void UARTDriver::_begin(uint32_t b, uint16_t rxS, uint16_t txS)
|
||||||
{
|
{
|
||||||
|
if (b == 0 && txS == 0 && rxS == 0 && _tx_initialised && _rx_initialised) {
|
||||||
|
// just changing port owner
|
||||||
|
_uart_owner_thd = chThdGetSelfX();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
thread_rx_init();
|
thread_rx_init();
|
||||||
|
|
||||||
if (sdef.serial == nullptr) {
|
if (sdef.serial == nullptr) {
|
||||||
|
Loading…
Reference in New Issue
Block a user