}
sdi->priv = devc;
sdi->driver = udmms[dmm].di;
- if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+ if (!(ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "P1")))
return NULL;
sdi->channels = g_slist_append(sdi->channels, ch);
static int dev_close(struct sr_dev_inst *sdi)
{
- (void)sdi;
-
/* TODO */
sdi->status = SR_ST_INACTIVE;
devc->starttime = g_get_monotonic_time();
/* Send header packet to the session bus. */
- std_session_send_df_header(cb_data, LOG_PREFIX);
+ std_session_send_df_header(sdi, LOG_PREFIX);
- sr_source_add(0, 0, 10 /* poll_timeout */,
+ sr_session_source_add(sdi->session, 0, 0, 10 /* poll_timeout */,
udmms[dmm].receive_data, (void *)sdi);
return SR_OK;
{
struct sr_datafeed_packet packet;
- (void)sdi;
+ (void)cb_data;
sr_dbg("Stopping acquisition.");
/* Send end packet to the session bus. */
sr_dbg("Sending SR_DF_END.");
packet.type = SR_DF_END;
- sr_session_send(cb_data, &packet);
+ sr_session_send(sdi, &packet);
- /* TODO? */
- sr_source_remove(0);
+ sr_session_source_remove(sdi->session, 0);
return SR_OK;
}