Fixes bug 89.
devc->limit_samples);
break;
default:
- sr_err("Unknown capability: %d.", id);
- return SR_ERR;
- break;
+ return SR_ERR_NA;
}
return SR_OK;
hwcaps, ARRAY_SIZE(hwcaps), sizeof(int32_t));
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
*data = g_variant_new_uint64(devc->cur_samplerate);
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
devc->limit_samples = g_variant_get_uint64(data);
break;
default:
- sr_err("Unknown capability: %d.", id);
- return SR_ERR;
+ return SR_ERR_NA;
}
return SR_OK;
*data = g_variant_builder_end(&gvb);
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
return SR_ERR;
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
else
ret = SR_OK;
} else {
- ret = SR_ERR;
+ ret = SR_ERR_NA;
}
return ret;
*data = g_variant_new_string(TRIGGER_TYPE);
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
devc->limit_msec = g_variant_get_uint64(data);
break;
default:
- sr_err("Unknown hardware capability: %d.", id);
- ret = SR_ERR_ARG;
+ ret = SR_ERR_NA;
}
return ret;
hwcaps, ARRAY_SIZE(hwcaps), sizeof(int32_t));
break;
default:
- sr_err("Unknown config key: %d.", key);
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
return SR_ERR;
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
sr_dbg("LIMIT_SAMPLES = %" PRIu64, devc->limit_samples);
break;
default:
- /* Unknown capability, return SR_ERR. */
- sr_err("%s: Unknown capability: %d.", __func__, id);
- return SR_ERR;
- break;
+ return SR_ERR_NA;
}
return SR_OK;
*data = g_variant_new_string(TRIGGER_TYPE);
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
devc->limit_samples);
break;
default:
- sr_err("Unknown capability: %d.", id);
- return SR_ERR;
- break;
+ return SR_ERR_NA;
}
return SR_OK;
hwcaps, ARRAY_SIZE(hwcaps), sizeof(int32_t));
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
}
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
sr_dbg("%s: setting pattern to %d",
__func__, devc->sample_generator);
} else {
- ret = SR_ERR;
+ ret = SR_ERR_NA;
}
return ret;
*data = g_variant_new_strv(pattern_strings, ARRAY_SIZE(pattern_strings));
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
devc->limit_samples);
break;
default:
- sr_err("Unknown capability: %d.", id);
- return SR_ERR;
- break;
+ return SR_ERR_NA;
}
return SR_OK;
hwcaps, ARRAY_SIZE(hwcaps), sizeof(int32_t));
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
return SR_ERR;
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
devc->limit_samples = g_variant_get_uint64(data);
ret = SR_OK;
} else {
- ret = SR_ERR;
+ ret = SR_ERR_NA;
}
return ret;
*data = g_variant_new_string(TRIGGER_TYPE);
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
*data = g_variant_new_int32(NUM_VDIV);
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
ret = SR_ERR_ARG;
break;
default:
- ret = SR_ERR_ARG;
+ ret = SR_ERR_NA;
break;
}
ARRAY_SIZE(trigger_sources));
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
*data = g_variant_new_uint64(devc->limit_samples);
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
devc->limit_samples);
break;
default:
- sr_err("Unknown hardware capability: %d.", id);
- ret = SR_ERR_ARG;
+ ret = SR_ERR_NA;
}
return ret;
hwcaps, ARRAY_SIZE(hwcaps), sizeof(int32_t));
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
return SR_ERR;
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
ret = SR_OK;
break;
default:
- ret = SR_ERR;
+ ret = SR_ERR_NA;
break;
}
*data = g_variant_new_string(TRIGGER_TYPE);
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
devc->limit_msec);
break;
default:
- sr_err("Unknown config: %d.", id);
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
hwcaps, ARRAY_SIZE(hwcaps), sizeof(int32_t));
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
switch (id) {
default:
- sr_err("Unknown hardware capability: %d.", id);
- ret = SR_ERR_ARG;
+ ret = SR_ERR_NA;
}
return ret;
switch (key) {
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
*data = g_variant_new_boolean(devc->flag_reg & FLAG_RLE ? TRUE : FALSE);
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
ret = SR_OK;
break;
default:
- ret = SR_ERR;
+ ret = SR_ERR_NA;
}
return ret;
*data = g_variant_new_string(TRIGGER_TYPE);
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
*data = g_variant_new_int32(NUM_VDIV);
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
ret = SR_ERR_ARG;
break;
default:
- sr_err("Unknown hardware capability: %d.", id);
- ret = SR_ERR_ARG;
+ ret = SR_ERR_NA;
break;
}
devc->has_digital ? ARRAY_SIZE(trigger_sources) : 4);
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
devc->limit_msec);
break;
default:
- sr_err("Unknown capability: %d.", id);
- return SR_ERR;
- break;
+ return SR_ERR_NA;
}
return SR_OK;
hwcaps, ARRAY_SIZE(hwcaps), sizeof(int32_t));
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
devc->limit_samples);
break;
default:
- sr_err("Unknown hardware capability: %d.", id);
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
hwcaps, ARRAY_SIZE(hwcaps), sizeof(int32_t));
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
devc->limit_samples);
break;
default:
- sr_err("Unknown capability: %d.", id);
- return SR_ERR;
- break;
+ return SR_ERR_NA;
}
return SR_OK;
hwcaps, ARRAY_SIZE(hwcaps), sizeof(int32_t));
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
devc->limit_samples);
break;
default:
- sr_err("Unknown hardware capability: %d.", id);
- ret = SR_ERR_ARG;
+ ret = SR_ERR_NA;
}
return ret;
hwcaps, ARRAY_SIZE(hwcaps), sizeof(int32_t));
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
return SR_ERR;
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
case SR_CONF_CAPTURE_RATIO:
return set_capture_ratio(devc, g_variant_get_uint64(data));
default:
- return SR_ERR;
+ return SR_ERR_NA;
}
return SR_OK;
*data = g_variant_new_string(TRIGGER_TYPE);
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
SR_ERR_ARG = -3, /**< Function argument error. */
SR_ERR_BUG = -4, /**< Errors hinting at internal bugs. */
SR_ERR_SAMPLERATE = -5, /**< Incorrect samplerate. */
+ SR_ERR_NA = -6, /**< Not applicable. */
};
#define SR_MAX_NUM_PROBES 64 /* Limited by uint64_t. */