mirror of
https://github.com/reactos/wine.git
synced 2025-01-23 04:15:48 +00:00
Add missing POSIX baud rates to GetCommState and SetCommState.
This commit is contained in:
parent
bbdd20d536
commit
0d34501876
@ -1131,10 +1131,28 @@ BOOL WINAPI SetCommState(
|
||||
#ifdef CBAUD
|
||||
port.c_cflag &= ~CBAUD;
|
||||
switch (lpdcb->BaudRate) {
|
||||
case 0:
|
||||
port.c_cflag |= B0;
|
||||
break;
|
||||
case 50:
|
||||
port.c_cflag |= B50;
|
||||
break;
|
||||
case 75:
|
||||
port.c_cflag |= B75;
|
||||
break;
|
||||
case 110:
|
||||
case CBR_110:
|
||||
port.c_cflag |= B110;
|
||||
break;
|
||||
case 134:
|
||||
port.c_cflag |= B134;
|
||||
break;
|
||||
case 150:
|
||||
port.c_cflag |= B150;
|
||||
break;
|
||||
case 200:
|
||||
port.c_cflag |= B200;
|
||||
break;
|
||||
case 300:
|
||||
case CBR_300:
|
||||
port.c_cflag |= B300;
|
||||
@ -1147,6 +1165,9 @@ BOOL WINAPI SetCommState(
|
||||
case CBR_1200:
|
||||
port.c_cflag |= B1200;
|
||||
break;
|
||||
case 1800:
|
||||
port.c_cflag |= B1800;
|
||||
break;
|
||||
case 2400:
|
||||
case CBR_2400:
|
||||
port.c_cflag |= B2400;
|
||||
@ -1218,10 +1239,28 @@ BOOL WINAPI SetCommState(
|
||||
}
|
||||
#elif !defined(__EMX__)
|
||||
switch (lpdcb->BaudRate) {
|
||||
case 0:
|
||||
port.c_ospeed = B0;
|
||||
break;
|
||||
case 50:
|
||||
port.c_ospeed = B50;
|
||||
break;
|
||||
case 75:
|
||||
port.c_ospeed = B75;
|
||||
break;
|
||||
case 110:
|
||||
case CBR_110:
|
||||
port.c_ospeed = B110;
|
||||
break;
|
||||
case 134:
|
||||
port.c_ospeed = B134;
|
||||
break;
|
||||
case 150:
|
||||
port.c_ospeed = B150;
|
||||
break;
|
||||
case 200:
|
||||
port.c_ospeed = B200;
|
||||
break;
|
||||
case 300:
|
||||
case CBR_300:
|
||||
port.c_ospeed = B300;
|
||||
@ -1234,6 +1273,9 @@ BOOL WINAPI SetCommState(
|
||||
case CBR_1200:
|
||||
port.c_ospeed = B1200;
|
||||
break;
|
||||
case 1800:
|
||||
port.c_ospeed = B1800;
|
||||
break;
|
||||
case 2400:
|
||||
case CBR_2400:
|
||||
port.c_ospeed = B2400;
|
||||
@ -1481,9 +1523,27 @@ BOOL WINAPI GetCommState(
|
||||
speed= (cfgetospeed(&port));
|
||||
#endif
|
||||
switch (speed) {
|
||||
case B0:
|
||||
lpdcb->BaudRate = 0;
|
||||
break;
|
||||
case B50:
|
||||
lpdcb->BaudRate = 50;
|
||||
break;
|
||||
case B75:
|
||||
lpdcb->BaudRate = 75;
|
||||
break;
|
||||
case B110:
|
||||
lpdcb->BaudRate = 110;
|
||||
break;
|
||||
case B134:
|
||||
lpdcb->BaudRate = 134;
|
||||
break;
|
||||
case B150:
|
||||
lpdcb->BaudRate = 150;
|
||||
break;
|
||||
case B200:
|
||||
lpdcb->BaudRate = 200;
|
||||
break;
|
||||
case B300:
|
||||
lpdcb->BaudRate = 300;
|
||||
break;
|
||||
@ -1493,6 +1553,9 @@ BOOL WINAPI GetCommState(
|
||||
case B1200:
|
||||
lpdcb->BaudRate = 1200;
|
||||
break;
|
||||
case B1800:
|
||||
lpdcb->BaudRate = 1800;
|
||||
break;
|
||||
case B2400:
|
||||
lpdcb->BaudRate = 2400;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user