SR_PRIV struct sr_dev_driver metex_m3640d_driver_info;
SR_PRIV struct sr_dev_driver peaktech_4370_driver_info;
SR_PRIV struct sr_dev_driver pce_pce_dm32_driver_info;
+SR_PRIV struct sr_dev_driver radioshack_22_168_driver_info;
static struct sr_dev_driver *di_dt4000zc = &digitek_dt4000zc_driver_info;
static struct sr_dev_driver *di_tp4000zc = &tekpower_tp4000zc_driver_info;
static struct sr_dev_driver *di_m3640d = &metex_m3640d_driver_info;
static struct sr_dev_driver *di_4370 = &peaktech_4370_driver_info;
static struct sr_dev_driver *di_pce_dm32 = &pce_pce_dm32_driver_info;
+static struct sr_dev_driver *di_22_168 = &radioshack_22_168_driver_info;
/* After hw_init() this will point to a device-specific entry (see above). */
static struct sr_dev_driver *di = NULL;
sr_fs9721_packet_valid, sr_fs9721_parse,
dmm_details_pce_dm32,
},
+ {
+ "RadioShack", "22-168", "1200/7n2/rts=0/dtr=1", 1200,
+ METEX14_PACKET_SIZE, sr_metex14_packet_request,
+ sr_metex14_packet_valid, sr_metex14_parse,
+ NULL,
+ },
};
/* Properly close and free all devices. */
di = di_4370;
if (dmm == PCE_PCE_DM32)
di = di_pce_dm32;
+ if (dmm == RADIOSHACK_22_168)
+ di = di_22_168;
sr_dbg("Selected '%s' subdriver.", di->name);
di->priv = drvc;
return hw_init(PCE_PCE_DM32);
}
+static int hw_init_radioshack_22_168(void)
+{
+ return hw_init(RADIOSHACK_22_168);
+}
+
static GSList *scan(const char *conn, const char *serialcomm, int dmm)
{
struct sr_dev_inst *sdi;
dmm = 7;
if (!strcmp(di->name, "pce-pce-dm32"))
dmm = 8;
+ if (!strcmp(di->name, "radioshack-22-168"))
+ dmm = 9;
if (serialcomm) {
/* Use the provided comm specs. */
receive_data = peaktech_4370_receive_data;
if (!strcmp(di->name, "pce-pce-dm32"))
receive_data = pce_pce_dm32_receive_data;
+ if (!strcmp(di->name, "radioshack-22-168"))
+ receive_data = radioshack_22_168_receive_data;
/* Poll every 50ms, or whenever some data comes in. */
sr_source_add(devc->serial->fd, G_IO_IN, 50,
.priv = NULL,
};
+SR_PRIV struct sr_dev_driver radioshack_22_168_driver_info = {
+ .name = "radioshack-22-168",
+ .longname = "RadioShack 22-168",
+ .api_version = 1,
+ .init = hw_init_radioshack_22_168,
+ .cleanup = hw_cleanup,
+ .scan = hw_scan,
+ .dev_list = hw_dev_list,
+ .dev_clear = clear_instances,
+ .dev_open = hw_dev_open,
+ .dev_close = hw_dev_close,
+ .info_get = hw_info_get,
+ .dev_config_set = hw_dev_config_set,
+ .dev_acquisition_start = hw_dev_acquisition_start,
+ .dev_acquisition_stop = hw_dev_acquisition_stop,
+ .priv = NULL,
+};
extern SR_PRIV struct sr_dev_driver metex_m3640d_driver_info;
extern SR_PRIV struct sr_dev_driver peaktech_4370_driver_info;
extern SR_PRIV struct sr_dev_driver pce_pce_dm32_driver_info;
+extern SR_PRIV struct sr_dev_driver radioshack_22_168_driver_info;
#endif
#ifdef HAVE_HW_UNI_T_DMM
extern SR_PRIV struct sr_dev_driver uni_t_ut61d_driver_info;
&metex_m3640d_driver_info,
&peaktech_4370_driver_info,
&pce_pce_dm32_driver_info,
+ &radioshack_22_168_driver_info,
#endif
#ifdef HAVE_HW_UNI_T_DMM
&uni_t_ut61d_driver_info,