devices = NULL;
- conn = serialcomm = NULL;
+ /*
+ * BEWARE! Default 'conn' is not desirable when the device cannot
+ * reliably get detected. Insist that users specify the port.
+ */
+ conn = NULL;
+ serialcomm = "9600/8n1/dtr=1/rts=1";
for (l = options; l; l = l->next) {
src = l->data;
switch (src->key) {
if (!conn)
return NULL;
- if (serialcomm)
- devices = brymen_scan(di, conn, serialcomm);
- else
- devices = brymen_scan(di, conn, "9600/8n1/dtr=1/rts=1");
+ devices = brymen_scan(di, conn, serialcomm);
return devices;
}
struct dev_context {
struct sr_sw_limits sw_limits;
-
uint8_t buf[DMM_BUFSIZE];
int bufoffset;
int buflen;
struct sr_datafeed_analog *analog, void *info);
SR_PRIV int brymen_stream_detect(struct sr_serial_dev_inst *serial,
- uint8_t *buf, size_t *buflen,
- packet_length_t get_packet_size,
- packet_valid_callback is_valid,
- uint64_t timeout_ms, int baudrate);
+ uint8_t *buf, size_t *buflen,
+ packet_length_t get_packet_size,
+ packet_valid_callback is_valid,
+ uint64_t timeout_ms, int baudrate);
#endif