]> sigrok.org Git - libsigrok.git/commitdiff
mso-19: Fixed warning.
authorlelazary <redacted>
Tue, 8 Jan 2013 16:00:57 +0000 (08:00 -0800)
committerUwe Hermann <redacted>
Sun, 3 Mar 2013 16:58:46 +0000 (17:58 +0100)
hardware/link-mso19/api.c
hardware/link-mso19/protocol.c

index 0bc02576d70c389bec90eeebdfa23c4498c3d7fc..93302655faec698323c1a10414ddf6e7c0763f62 100644 (file)
@@ -323,8 +323,8 @@ static int config_set(int id, const void *value, const struct sr_dev_inst *sdi)
                break;
        case SR_CONF_LIMIT_SAMPLES:
                num_samples = *(uint64_t *)value;
-               if (num_samples < 1024) {
-                       sr_err("minimum of 1024 samples required");
+               if (num_samples != 1024) {
+                       sr_err("Only 1024 samples are supported.");
                        ret = SR_ERR_ARG;
                } else {
                        devc->limit_samples = num_samples;
index d94e2b6c1b3d6625042d26f64d93e4f0f7792cb0..d41a9e72251fc4817e29c3d92f70fc2464c0ed57 100644 (file)
@@ -121,7 +121,7 @@ SR_PRIV int mso_configure_trigger(const struct sr_dev_inst *sdi)
        uint16_t ops[18];
        ops[0] = mso_trans(3, threshold_value & 0xff);
        //The trigger_config also holds the 2 MSB bits from the threshold value
-       ops[1] = mso_trans(4, trigger_config | (threshold_value >> 8) & 0x03);
+       ops[1] = mso_trans(4, trigger_config | ((threshold_value >> 8) & 0x03));
        ops[2] = mso_trans(5, devc->la_trigger);
        ops[3] = mso_trans(6, devc->la_trigger_mask);
        ops[4] = mso_trans(7, devc->trigger_holdoff[0]);