commit 0469de49c18e820b4b17cb4b84a8e1a5eb7cabe6 Author: Daniel Ribeiro <[email protected]> Date: Mon Jan 10 15:05:14 2011 -0200
serial.c: fix parity != none
The flag write was wrong
diff --git a/libsigrok/hardware/common/serial.c
b/libsigrok/hardware/common/serial.c
index cebca29..18b62d0 100644
--- a/libsigrok/hardware/common/serial.c
+++ b/libsigrok/hardware/common/serial.c
@@ -228,16 +228,17 @@ int serial_set_params(int fd, int speed, int bits,
int parity, int stopbits,
return SIGROK_ERR;
}
- term.c_iflag &= ~(IGNPAR | PARODD | PARENB);
+ term.c_iflag &= ~IGNPAR;
+ term.c_cflag &= ~(PARODD | PARENB);
switch (parity) {
case 0:
term.c_iflag |= IGNPAR;
break;
case 1:
- term.c_iflag |= PARENB;
+ term.c_cflag |= PARENB;
break;
case 2:
- term.c_iflag |= PARENB | PARODD;
+ term.c_cflag |= PARENB | PARODD;
break;
default:
return SIGROK_ERR;
--
Daniel Ribeiro
signature.asc
Description: Esta é uma parte de mensagem assinada digitalmente
------------------------------------------------------------------------------ Gaining the trust of online customers is vital for the success of any company that requires sensitive data to be transmitted over the Web. Learn how to best implement a security strategy that keeps consumers' information secure and instills the confidence they need to proceed with transactions. http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________ sigrok-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sigrok-devel

