X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=output%2Fcsv.c;h=558f1eec097832fac1bd8d94d16ac0a57fde5426;hb=50985c2019b2b5a6ce394589d89ee925b4f5e3a9;hp=c86fd7c919e7151635279b3711b2ad5a4a0bab79;hpb=a944a84b17c5f5544b45e27dc07d7f60a4fd6ba8;p=libsigrok.git diff --git a/output/csv.c b/output/csv.c index c86fd7c9..558f1eec 100644 --- a/output/csv.c +++ b/output/csv.c @@ -1,5 +1,5 @@ /* - * This file is part of the sigrok project. + * This file is part of the libsigrok project. * * Copyright (C) 2011 Uwe Hermann * @@ -60,8 +60,8 @@ static int init(struct sr_output *o) struct context *ctx; struct sr_probe *probe; GSList *l; + GVariant *gvar; int num_probes; - uint64_t *samplerate; time_t t; unsigned int i; @@ -99,10 +99,10 @@ static int init(struct sr_output *o) num_probes = g_slist_length(o->sdi->probes); - if (sr_dev_has_hwcap(o->sdi, SR_HWCAP_SAMPLERATE)) { - o->sdi->driver->info_get(SR_DI_CUR_SAMPLERATE, - (const void **)&samplerate, o->sdi); - ctx->samplerate = *samplerate; + if (sr_dev_has_option(o->sdi, SR_CONF_SAMPLERATE)) { + o->sdi->driver->config_get(SR_CONF_SAMPLERATE, &gvar, o->sdi); + ctx->samplerate = g_variant_get_uint64(gvar); + g_variant_unref(gvar); } else ctx->samplerate = 0;