Commit 0d345018 authored by Rein Klazes's avatar Rein Klazes Committed by Alexandre Julliard

Add missing POSIX baud rates to GetCommState and SetCommState.

parent bbdd20d5
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment