libsigrok: (Trivial) Add support for 2400 baud

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
This commit is contained in:
Alexandru Gagniuc 2012-10-19 17:50:20 -05:00 committed by Bert Vermeulen
parent 777bbd5b98
commit 0f70830194
1 changed files with 6 additions and 0 deletions

View File

@ -221,6 +221,9 @@ SR_PRIV int serial_set_params(int fd, int baudrate, int bits, int parity,
case 4800:
dcb.BaudRate = CBR_4800;
break;
case 2400:
dcb.BaudRate = CBR_2400;
break;
default:
/* TODO: Error handling. */
break;
@ -241,6 +244,9 @@ SR_PRIV int serial_set_params(int fd, int baudrate, int bits, int parity,
return SR_ERR;
switch (baudrate) {
case 2400:
baud = B2400;
break;
case 4800:
baud = B4800;
break;