X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fzeroplus-logic-cube%2Fzeroplus.c;h=f51f918311d445f32c8036af9fb2178f3bf7d1e4;hb=3cd3a20b350ed1e86675aee067f60ac5a2f576b1;hp=3382c907792674076974c1b572f79bb73b2722f7;hpb=1f9813eb6cf2fa3b6511af46b19270feb9484c1e;p=libsigrok.git diff --git a/hardware/zeroplus-logic-cube/zeroplus.c b/hardware/zeroplus-logic-cube/zeroplus.c index 3382c907..f51f9183 100644 --- a/hardware/zeroplus-logic-cube/zeroplus.c +++ b/hardware/zeroplus-logic-cube/zeroplus.c @@ -613,7 +613,7 @@ static int hw_dev_config_set(int dev_index, int hwcap, void *value) } } -static int hw_dev_acquisition_start(int dev_index, void *session_data) +static int hw_dev_acquisition_start(int dev_index, void *cb_data) { struct sr_dev_inst *sdi; struct sr_datafeed_packet packet; @@ -655,7 +655,7 @@ static int hw_dev_acquisition_start(int dev_index, void *session_data) gettimeofday(&header.starttime, NULL); header.samplerate = ctx->cur_samplerate; header.num_logic_probes = ctx->num_channels; - sr_session_send(session_data, &packet); + sr_session_send(cb_data, &packet); if (!(buf = g_try_malloc(PACKET_SIZE))) { sr_err("zp: %s: buf malloc failed", __func__); @@ -676,27 +676,27 @@ static int hw_dev_acquisition_start(int dev_index, void *session_data) logic.length = PACKET_SIZE; logic.unitsize = 4; logic.data = buf; - sr_session_send(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_send(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, void *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_send(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__);