genericdmm: allow for default options in DMM profiles

Much better than the special-cased USB vid.pid
This commit is contained in:
Bert Vermeulen 2012-07-08 04:09:55 +02:00
parent 7356a55db8
commit 7fc754a0db
2 changed files with 9 additions and 5 deletions

View File

@ -29,10 +29,16 @@
extern SR_PRIV struct dmmchip dmmchip_fs9922;
static struct sr_hwopt victor_70c_vidpid[] = {
{ SR_HWOPT_CONN, "1244.d237" },
{ 0, NULL }
};
static struct dev_profile dev_profiles[] = {
{ "victor-70c", "Victor", "70C", &dmmchip_fs9922,
0x1244, 0xd237, DMM_TRANSPORT_USBHID },
{ "mastech-va18b", "Mastech", "VA18B", NULL, 0, 0, DMM_TRANSPORT_SERIAL},
DMM_TRANSPORT_USBHID, victor_70c_vidpid
},
{ "mastech-va18b", "Mastech", "VA18B", NULL, DMM_TRANSPORT_SERIAL, NULL},
{ NULL, NULL, NULL, NULL, 0, NULL }
};
static const int hwcaps[] = {

View File

@ -40,10 +40,8 @@ struct dev_profile {
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 {