sr_info("Probing serial port %s.", conn);
devices = NULL;
- serial_flush(serial);
sr_spew("Set O1 mode (continuous values, stable and unstable ones).");
if (serial_write_blocking(serial, "O1\r\n", 4, 0) < 0)
/* Let's get a bit of data and see if we can find a packet. */
len = sizeof(buf);
ret = serial_stream_detect(serial, buf, &len, scale->packet_size,
- scale->packet_valid, 3000, scale->baudrate);
+ scale->packet_valid, NULL, NULL, 3000);
if (ret != SR_OK)
goto scan_cleanup;
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) { \
{ \
.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
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
)
);