mirror of
git://sigrok.org/libserialport
synced 2023-08-10 21:13:24 +03:00
windows: Ignore fParity flag which is always 0 after GetCommState().
This is a known bug in Windows: https://stackoverflow.com/a/36650872 Reported here: https://github.com/martinling/libserialport/issues/36
This commit is contained in:
parent
6711e43e9b
commit
2913355f7e
@ -1648,7 +1648,6 @@ static enum sp_return get_config(struct sp_port *port, struct port_data *data,
|
|||||||
|
|
||||||
config->bits = data->dcb.ByteSize;
|
config->bits = data->dcb.ByteSize;
|
||||||
|
|
||||||
if (data->dcb.fParity)
|
|
||||||
switch (data->dcb.Parity) {
|
switch (data->dcb.Parity) {
|
||||||
case NOPARITY:
|
case NOPARITY:
|
||||||
config->parity = SP_PARITY_NONE;
|
config->parity = SP_PARITY_NONE;
|
||||||
@ -1668,8 +1667,6 @@ static enum sp_return get_config(struct sp_port *port, struct port_data *data,
|
|||||||
default:
|
default:
|
||||||
config->parity = -1;
|
config->parity = -1;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
config->parity = SP_PARITY_NONE;
|
|
||||||
|
|
||||||
switch (data->dcb.StopBits) {
|
switch (data->dcb.StopBits) {
|
||||||
case ONESTOPBIT:
|
case ONESTOPBIT:
|
||||||
|
Loading…
Reference in New Issue
Block a user