#define LIBSIGROK_GENERICDMM_H
/* SR_HWCAP_CONN takes one of these: */
-#define DMM_CONN_USB_VIDPID "^([0--9a-z]{1,4}):([0--9a-z]{1,4})$"
+#define DMM_CONN_USB_VIDPID "^([0-9a-z]{1,4})\\.([0-9a-z]{1,4})$"
#define DMM_CONN_USB_BUSADDR "^(\\d+)\\.(\\d+)$"
#define DMM_CONN_SERIALPORT "^([a-z0-9/\\-_]+)$"
char *vendor;
char *model;
struct dmmchip *chip;
- /* Only use when the VID:PID is really specific to a DMM. */
- uint16_t vid;
- uint16_t pid;
int transport;
+ struct sr_hwopt *defaults_opts;
};
struct context {
struct dmmchip {
/* Optional, called once before measurement starts. */
- int (*init) (struct context *ctx);
+ int (*init) (void);
+
+ /* Scan for devices with the given options. */
+ GSList *(*scan) (GSList *options);
+
/* Called whenever a chunk of data arrives. */
- int (*data) (struct context *ctx, unsigned char *data);
+ int (*data) (struct sr_dev_inst *sdi, unsigned char *data);
};