Can I change serial port baudrate on the fly?

I have one free UART port on my pixracer and I want to use it to control two devices simultaneously:

  • video TX (smartaudio protocol, to change radio power on the fly)
  • FPV camera (to start/stop recording via Runcam protocol)

Both protocols are just a set of small commands but the problem that these devices are using differend baud rates: 9600 and 115200

I found how ports are initialized within AP_SerialManager::init() function, but is it allowed to change port baud rate on the fly?

So as per that comment in UARTDriver.begin()

 /// Allows for both opening with specified buffer sizes, and re-opening to adjust a subset of the port's settings.

I hope it is OK to re-open the port.

I have one more question.
As the smartaudio is a single-wire protocol for both transmit and recieve, can I just put together both TX and RX lines from FC board?

Answering to myself - yes, port can be re-initialized on the fly. That works without a problem.