]> sigrok.org Git - libsigrok.git/commitdiff
demo: Add some more debug output.
authorUwe Hermann <redacted>
Sun, 1 May 2011 23:40:16 +0000 (01:40 +0200)
committerUwe Hermann <redacted>
Sun, 1 May 2011 23:40:16 +0000 (01:40 +0200)
hardware/demo/demo.c

index 0ebfd271701e99d146752c6d741a9a2973ef2a1f..7085586692f51f0ba88263d6f097aa59bbe88044 100644 (file)
@@ -194,14 +194,20 @@ static int hw_set_configuration(int device_index, int capability, void *value)
        } else if (capability == SR_HWCAP_SAMPLERATE) {
                tmp_u64 = value;
                cur_samplerate = *tmp_u64;
+               sr_dbg("demo: %s: setting samplerate to %" PRIu64, __func__,
+                      cur_samplerate);
                ret = SR_OK;
        } else if (capability == SR_HWCAP_LIMIT_SAMPLES) {
                tmp_u64 = value;
                limit_samples = *tmp_u64;
+               sr_dbg("demo: %s: setting limit_samples to %" PRIu64, __func__,
+                      limit_samples);
                ret = SR_OK;
        } else if (capability == SR_HWCAP_LIMIT_MSEC) {
                tmp_u64 = value;
                limit_msec = *tmp_u64;
+               sr_dbg("demo: %s: setting limit_msec to %" PRIu64, __func__,
+                      limit_msec);
                ret = SR_OK;
        } else if (capability == SR_HWCAP_PATTERN_MODE) {
                stropt = value;
@@ -214,6 +220,8 @@ static int hw_set_configuration(int device_index, int capability, void *value)
                } else {
                        ret = SR_ERR;
                }
+               sr_dbg("demo: %s: setting patternmode to %d", __func__,
+                      default_genmode);
        } else {
                ret = SR_ERR;
        }