MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / setBaudRate

Method setBaudRate

app/src/IO/Drivers/UART.cpp:495–506  ·  view source on GitHub ↗

* @brief Changes the baud rate of the serial port. */

Source from the content-addressed store, hash-verified

493 * @brief Changes the baud rate of the serial port.
494 */
495void IO::Drivers::UART::setBaudRate(const qint32 rate)
496{
497 if (m_baudRate != rate && rate > 0) {
498 m_baudRate = rate;
499 m_settings.setValue("IO_Serial_Baud_Rate", rate);
500
501 if (port())
502 port()->setBaudRate(baudRate());
503
504 Q_EMIT baudRateChanged();
505 }
506}
507
508/**
509 * @brief Sets the Data Terminal Ready (DTR) signal state.

Callers 5

openMethod · 0.45
openMethod · 0.45
openMethod · 0.45
setupUartConnectionMethod · 0.45
applyModbusBaudFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected