From: Alexandru Gagniuc Date: Mon, 15 Oct 2012 06:12:53 +0000 (-0500) Subject: serial: (Trivial) add support for 4800 baud X-Git-Tag: dsupstream~670 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=e8e9dcdd705c64a8ac1c04bc04d91e1a371e76c8;p=libsigrok.git serial: (Trivial) add support for 4800 baud Signed-off-by: Alexandru Gagniuc --- diff --git a/hardware/common/serial.c b/hardware/common/serial.c index ad88958a..7a89af66 100644 --- a/hardware/common/serial.c +++ b/hardware/common/serial.c @@ -218,6 +218,9 @@ SR_PRIV int serial_set_params(int fd, int baudrate, int bits, int parity, case 9600: dcb.BaudRate = CBR_9600; break; + case 4800: + dcb.BaudRate = CBR_4800; + break; default: /* TODO: Error handling. */ break; @@ -238,6 +241,9 @@ SR_PRIV int serial_set_params(int fd, int baudrate, int bits, int parity, return SR_ERR; switch (baudrate) { + case 4800: + baud = B4800; + break; case 9600: baud = B9600; break;