static const uint32_t devopts[] = {
SR_CONF_CONTINUOUS,
- SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
- SR_CONF_LIMIT_MSEC | SR_CONF_SET,
+ SR_CONF_LIMIT_FRAMES | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
};
static GSList *rdtech_tc_scan(struct sr_dev_driver *di,
return rdtech_tc_scan(di, conn, serialcomm);
}
+static int config_get(uint32_t key, GVariant **data,
+ const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
+{
+ struct dev_context *devc;
+
+ (void)cg;
+
+ devc = sdi->priv;
+
+ return sr_sw_limits_config_get(&devc->limits, key, data);
+}
+
static int config_set(uint32_t key, GVariant *data,
const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
{
.scan = scan,
.dev_list = std_dev_list,
.dev_clear = dev_clear,
- .config_get = NULL,
+ .config_get = config_get,
.config_set = config_set,
.config_list = config_list,
.dev_open = std_serial_dev_open,
return SR_ERR_DATA;
}
+ ret = SR_OK;
+ std_session_send_df_frame_begin(sdi);
for (ch_idx = 0; ch_idx < devc->channel_count; ch_idx++) {
pch = &devc->channels[ch_idx];
ret = bv_get_value(&v, &pch->spec, poll_pkt, TC_POLL_LEN);
if (ret != SR_OK)
- return ret;
+ break;
ret = feed_queue_analog_submit(devc->feeds[ch_idx], v, 1);
if (ret != SR_OK)
- return ret;
+ break;
}
+ std_session_send_df_frame_end(sdi);
- sr_sw_limits_update_samples_read(&devc->limits, 1);
+ sr_sw_limits_update_frames_read(&devc->limits, 1);
if (sr_sw_limits_check(&devc->limits))
sr_dev_acquisition_stop(sdi);
- return SR_OK;
+ return ret;
}
static int recv_poll_data(struct sr_dev_inst *sdi, struct sr_serial_dev_inst *serial)