]> sigrok.org Git - libsigrok.git/commitdiff
libsigrok: (Trivial) Add support for 2400 baud
authorAlexandru Gagniuc <redacted>
Fri, 19 Oct 2012 22:50:20 +0000 (17:50 -0500)
committerBert Vermeulen <redacted>
Sat, 20 Oct 2012 21:02:14 +0000 (23:02 +0200)
Signed-off-by: Alexandru Gagniuc <redacted>
hardware/common/serial.c

index 7a89af663eedde1b3da0915fb00a87f4db6cd526..651b58269c74cf6ccee09484afe83f714ec426c4 100644 (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;