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.
This commit is contained in:
parent
d03815a066
commit
685ed70998
|
@ -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
|
||||
)
|
||||
);
|
||||
|
|
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue