mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-22 08:05:49 +08:00
Remove some serial port oddities.
This commit is contained in:
@@ -295,7 +295,6 @@ bool CUARTController::setRaw()
|
|||||||
termios.c_cc[VTIME] = 10;
|
termios.c_cc[VTIME] = 10;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(B38400) || (B38400 != 38400)
|
|
||||||
switch (m_speed) {
|
switch (m_speed) {
|
||||||
#if defined(B1200)
|
#if defined(B1200)
|
||||||
case 1200U:
|
case 1200U:
|
||||||
@@ -368,10 +367,6 @@ bool CUARTController::setRaw()
|
|||||||
::close(m_fd);
|
::close(m_fd);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
::cfsetospeed(&termios, m_speed);
|
|
||||||
::cfsetispeed(&termios, m_speed);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (::tcsetattr(m_fd, TCSANOW, &termios) < 0) {
|
if (::tcsetattr(m_fd, TCSANOW, &termios) < 0) {
|
||||||
LogError("Cannot set the attributes for %s", m_device.c_str());
|
LogError("Cannot set the attributes for %s", m_device.c_str());
|
||||||
|
|||||||
Reference in New Issue
Block a user