libsigrok: (Trivial) Add support for 2400 baud
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
This commit is contained in:
parent
777bbd5b98
commit
0f70830194
|
@ -221,6 +221,9 @@ SR_PRIV int serial_set_params(int fd, int baudrate, int bits, int parity,
|
||||||
case 4800:
|
case 4800:
|
||||||
dcb.BaudRate = CBR_4800;
|
dcb.BaudRate = CBR_4800;
|
||||||
break;
|
break;
|
||||||
|
case 2400:
|
||||||
|
dcb.BaudRate = CBR_2400;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
/* TODO: Error handling. */
|
/* TODO: Error handling. */
|
||||||
break;
|
break;
|
||||||
|
@ -241,6 +244,9 @@ SR_PRIV int serial_set_params(int fd, int baudrate, int bits, int parity,
|
||||||
return SR_ERR;
|
return SR_ERR;
|
||||||
|
|
||||||
switch (baudrate) {
|
switch (baudrate) {
|
||||||
|
case 2400:
|
||||||
|
baud = B2400;
|
||||||
|
break;
|
||||||
case 4800:
|
case 4800:
|
||||||
baud = B4800;
|
baud = B4800;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue