From: Gerhard Sittig Date: Wed, 1 May 2019 18:11:46 +0000 (+0200) Subject: kern-scale: drop obsolete redundant 'baudrate' parameter value X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=685ed709982f5edd84f7666d0a8e03c2124dff92;p=libsigrok.git kern-scale: drop obsolete redundant 'baudrate' parameter value 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. --- diff --git a/src/hardware/kern-scale/api.c b/src/hardware/kern-scale/api.c index fba3e4a5..70e85a07 100644 --- a/src/hardware/kern-scale/api.c +++ b/src/hardware/kern-scale/api.c @@ -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 ) ); diff --git a/src/hardware/kern-scale/protocol.h b/src/hardware/kern-scale/protocol.h index 836eb91b..7566ea5b 100644 --- a/src/hardware/kern-scale/protocol.h +++ b/src/hardware/kern-scale/protocol.h @@ -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. */