]> sigrok.org Git - libsigrok.git/commitdiff
kern-scale: drop obsolete redundant 'baudrate' parameter value
authorGerhard Sittig <redacted>
Wed, 1 May 2019 18:11:46 +0000 (20:11 +0200)
committerGerhard Sittig <redacted>
Sun, 9 Jun 2019 12:51:02 +0000 (14:51 +0200)
The serial communication timing parameters during probe get determined
from earlier serial port configuration, which obsoletes the redundant
'baudrate' parameter, and eliminates potential inconsistency between
user specified parameters and builtin default values.

src/hardware/kern-scale/api.c
src/hardware/kern-scale/protocol.h

index fba3e4a50d155e7e5156d7f50de606938147eeaa..70e85a0775f0898f00697599d257334c5490063d 100644 (file)
@@ -153,7 +153,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
        return SR_OK;
 }
 
-#define SCALE(ID, CHIPSET, VENDOR, MODEL, CONN, BAUDRATE, PACKETSIZE, \
+#define SCALE(ID, CHIPSET, VENDOR, MODEL, CONN, PACKETSIZE, \
                        VALID, PARSE) \
        &((struct scale_info) { \
                { \
@@ -174,7 +174,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
                        .dev_acquisition_stop = std_serial_dev_acquisition_stop, \
                        .context = NULL, \
                }, \
-               VENDOR, MODEL, CONN, BAUDRATE, PACKETSIZE, \
+               VENDOR, MODEL, CONN, PACKETSIZE, \
                VALID, PARSE, sizeof(struct CHIPSET##_info) \
        }).di
 
@@ -191,7 +191,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
 SR_REGISTER_DEV_DRIVER_LIST(kern_scale_drivers,
        SCALE(
                "kern-ew-6200-2nm", kern,
-               "KERN", "EW 6200-2NM", "1200/8n2", 1200,
+               "KERN", "EW 6200-2NM", "1200/8n2",
                15 /* (or 14) */, sr_kern_packet_valid, sr_kern_parse
        )
 );
index 836eb91b0404014ac7670cae80467f656743271c..7566ea5b291e2b769fef89332108de07a572383e 100644 (file)
@@ -31,8 +31,6 @@ struct scale_info {
        const char *device;
        /** serialconn string. */
        const char *conn;
-       /** Baud rate. */
-       uint32_t baudrate;
        /** Packet size in bytes. */
        int packet_size;
        /** Packet validation function. */