rename global conn
This commit is contained in:
1 parent
8280fc3c07
commit
6a2f2b3979
23 files changed
+87
-87
No files matched your search
@@ -340,7 +340,7 @@ serial_port uart_open(const char *pcPortName, uint32_t speed) {
|
||||
return INVALID_SERIAL_PORT;
|
||||
}
|
||||
}
|
||||
conn.uart_speed = uart_get_speed(sp);
|
||||
g_conn.uart_speed = uart_get_speed(sp);
|
||||
return sp;
|
||||
}
|
||||
|
||||
@@ -558,7 +558,7 @@ bool uart_set_speed(serial_port sp, const uint32_t uiPortSpeed) {
|
||||
cfsetospeed(&ti, stPortSpeed);
|
||||
bool result = tcsetattr(spu->fd, TCSANOW, &ti) != -1;
|
||||
if (result)
|
||||
conn.uart_speed = uiPortSpeed;
|
||||
g_conn.uart_speed = uiPortSpeed;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ serial_port uart_open(const char *pcPortName, uint32_t speed) {
|
||||
return INVALID_SERIAL_PORT;
|
||||
}
|
||||
}
|
||||
conn.uart_speed = uart_get_speed(sp);
|
||||
g_conn.uart_speed = uart_get_speed(sp);
|
||||
return sp;
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ bool uart_set_speed(serial_port sp, const uint32_t uiPortSpeed) {
|
||||
bool result = SetCommState(spw->hPort, &spw->dcb);
|
||||
PurgeComm(spw->hPort, PURGE_RXABORT | PURGE_RXCLEAR);
|
||||
if (result)
|
||||
conn.uart_speed = uiPortSpeed;
|
||||
g_conn.uart_speed = uiPortSpeed;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user