analog.data = &temp;
packet.type = SR_DF_ANALOG_OLD;
packet.payload = &analog;
- sr_session_send(devc->cb_data, &packet);
+ sr_session_send(sdi, &packet);
g_slist_free(analog.channels);
}
}
* memory slots come through as "----" measurements. */
devc->num_samples++;
if (devc->limit_samples && devc->num_samples >= devc->limit_samples) {
- sdi->driver->dev_acquisition_stop((struct sr_dev_inst *)sdi,
- devc->cb_data);
+ sdi->driver->dev_acquisition_stop(sdi);
}
}
struct dev_context *devc;
struct sr_dev_driver *di;
struct sr_dev_inst *sdi;
- struct sr_datafeed_packet packet;
struct sr_usb_dev_inst *usb;
struct timeval tv;
int len, ret;
if (sdi->status == SR_ST_STOPPING) {
usb_source_remove(sdi->session, drvc->sr_ctx);
- packet.type = SR_DF_END;
- sr_session_send(cb_data, &packet);
+ std_session_send_df_end(sdi, LOG_PREFIX);
/* Tell the device to stop sending USB packets. */
usb = sdi->conn;