]> sigrok.org Git - libsigrok.git/commitdiff
serial: (Trivial) add support for 4800 baud
authorAlexandru Gagniuc <redacted>
Mon, 15 Oct 2012 06:12:53 +0000 (01:12 -0500)
committerBert Vermeulen <redacted>
Mon, 15 Oct 2012 15:32:58 +0000 (17:32 +0200)
Signed-off-by: Alexandru Gagniuc <redacted>
hardware/common/serial.c

index ad88958a0d0feb5c6601651687acdb1dd593c4cd..7a89af663eedde1b3da0915fb00a87f4db6cd526 100644 (file)
@@ -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;