return &fx2lafw_samplerates;
case SR_DI_TRIGGER_TYPES:
return TRIGGER_TYPES;
+ case SR_DI_CUR_SAMPLERATE:
+ return &ctx->cur_samplerate;
}
return NULL;
return SR_ERR;
ctx = sdi->priv;
- if (hwcap == SR_HWCAP_LIMIT_SAMPLES) {
+ if (hwcap == SR_HWCAP_SAMPLERATE) {
+ ctx->cur_samplerate = *(uint64_t *)value;
+ ret = SR_OK;
+ } else if (hwcap == SR_HWCAP_PROBECONFIG) {
+ ret = SR_OK;
+ } else if (hwcap == SR_HWCAP_LIMIT_SAMPLES) {
ctx->limit_samples = *(uint64_t *)value;
ret = SR_OK;
} else {
packet->payload = header;
header->feed_version = 1;
gettimeofday(&header->starttime, NULL);
- header->samplerate = 24000000UL;
+ header->samplerate = ctx->cur_samplerate;
header->num_logic_probes = ctx->profile->num_probes;
sr_session_send(cb_data, packet);
g_free(header);