0,
};
+/*
+ * ZEROPLUS LAP-C (16032) numbers the 16 probes A0-A7 and B0-B7.
+ * We currently ignore other untested/unsupported devices here.
+ */
static const char *probe_names[] = {
- "0",
- "1",
- "2",
- "3",
- "4",
- "5",
- "6",
- "7",
- "8",
- "9",
- "10",
- "11",
- "12",
- "13",
- "14",
- "15",
- "16",
- "17",
- "18",
- "19",
- "20",
- "21",
- "22",
- "23",
- "24",
- "25",
- "26",
- "27",
- "28",
- "29",
- "30",
- "31",
+ "A0",
+ "A1",
+ "A2",
+ "A3",
+ "A4",
+ "A5",
+ "A6",
+ "A7",
+ "B0",
+ "B1",
+ "B2",
+ "B3",
+ "B4",
+ "B5",
+ "B6",
+ "B7",
NULL,
};
struct sr_dev_inst *sdi;
libusb_device **devlist;
struct libusb_device_descriptor des;
- int err, i;
+ int i;
if (!(sdi = sr_dev_inst_get(dev_insts, dev_index)))
return NULL;
libusb_get_device_list(usb_context, &devlist);
for (i = 0; devlist[i]; i++) {
/* TODO: Error handling. */
- err = opendev4(&sdi, devlist[i], &des);
+ opendev4(&sdi, devlist[i], &des);
}
} else {
/* Status must be SR_ST_ACTIVE, i.e. already in use... */
}
}
-static int hw_dev_acquisition_start(int dev_index, gpointer session_data)
+static int hw_dev_acquisition_start(int dev_index, void *cb_data)
{
struct sr_dev_inst *sdi;
struct sr_datafeed_packet packet;
gettimeofday(&header.starttime, NULL);
header.samplerate = ctx->cur_samplerate;
header.num_logic_probes = ctx->num_channels;
- sr_session_bus(session_data, &packet);
+ sr_session_send(cb_data, &packet);
if (!(buf = g_try_malloc(PACKET_SIZE))) {
sr_err("zp: %s: buf malloc failed", __func__);
logic.length = PACKET_SIZE;
logic.unitsize = 4;
logic.data = buf;
- sr_session_bus(session_data, &packet);
+ sr_session_send(cb_data, &packet);
samples_read += res / 4;
}
analyzer_read_stop(ctx->usb->devhdl);
g_free(buf);
packet.type = SR_DF_END;
- sr_session_bus(session_data, &packet);
+ sr_session_send(cb_data, &packet);
return SR_OK;
}
-/* This stops acquisition on ALL devices, ignoring dev_index. */
-static int hw_dev_acquisition_stop(int dev_index, gpointer session_dev_id)
+/* TODO: This stops acquisition on ALL devices, ignoring dev_index. */
+static int hw_dev_acquisition_stop(int dev_index, void *cb_data)
{
struct sr_datafeed_packet packet;
struct sr_dev_inst *sdi;
struct context *ctx;
packet.type = SR_DF_END;
- sr_session_bus(session_dev_id, &packet);
+ sr_session_send(cb_data, &packet);
if (!(sdi = sr_dev_inst_get(dev_insts, dev_index))) {
sr_err("zp: %s: sdi was NULL", __func__);
return SR_OK;
}
-SR_PRIV struct sr_dev_plugin zeroplus_logic_cube_plugin_info = {
+SR_PRIV struct sr_dev_driver zeroplus_logic_cube_driver_info = {
.name = "zeroplus-logic-cube",
.longname = "Zeroplus Logic Cube LAP-C series",
.api_version = 1,