Move a logic threshold related switch case to the location where its
sibling config keys reside. Which eliminates a separate distant chunk
under an ifdef which should not have been there in the first place.
Make the presence of a device context member depend on the choice of
simple or complex threshold support. The simple approach exclusively
requires one index into the discrete set of a few voltages.
LA2016_THR_VOLTAGE_MIN,
LA2016_THR_VOLTAGE_MAX, 0.1);
break;
+ case SR_CONF_LOGIC_THRESHOLD:
+ *data = g_variant_new_strv(ARRAY_AND_SIZE(logic_threshold));
+ break;
#endif /* WITH_THRESHOLD_SIMPLE */
#endif /* WITH_THRESHOLD_DEVCFG */
case SR_CONF_TRIGGER_MATCH:
*data = std_gvar_array_i32(ARRAY_AND_SIZE(trigger_matches));
break;
-#if WITH_THRESHOLD_DEVCFG && !WITH_THRESHOLD_SIMPLE
- case SR_CONF_LOGIC_THRESHOLD:
- *data = g_variant_new_strv(ARRAY_AND_SIZE(logic_threshold));
- break;
-#endif
default:
return SR_ERR_NA;
}
float duty;
} pwm_setting[LA2016_NUM_PWMCH_MAX];
size_t threshold_voltage_idx;
+#if !WITH_THRESHOLD_SIMPLE
float threshold_voltage;
+#endif
uint64_t cur_samplerate;
struct sr_sw_limits sw_limits;
uint64_t capture_ratio;