+ case SR_HWCAP_VDIV:
+ /* TODO not supporting vdiv per channel yet */
+ tmp_rat = *(const struct sr_rational *)value;
+ for (i = 0; vdivs[i].p && vdivs[i].q; i++) {
+ if (vdivs[i].p == tmp_rat.p
+ && vdivs[i].q == tmp_rat.q) {
+ ctx->voltage_ch1 = i;
+ ctx->voltage_ch2 = i;
+ break;
+ }
+ }
+ if (vdivs[i].p == 0 && vdivs[i].q == 0)
+ ret = SR_ERR_ARG;
+ break;
+ case SR_HWCAP_COUPLING:
+ /* TODO not supporting coupling per channel yet */
+ for (i = 0; coupling[i]; i++) {
+ if (!strcmp(value, coupling[i])) {
+ ctx->coupling_ch1 = i;
+ ctx->coupling_ch2 = i;
+ break;
+ }
+ }
+ if (coupling[i] == 0)
+ ret = SR_ERR_ARG;
+ break;