+/* Container to get and set parameter values. */
+struct rdtech_dps_state {
+ enum rdtech_dps_state_mask {
+ STATE_LOCK = 1 << 0,
+ STATE_OUTPUT_ENABLED = 1 << 1,
+ STATE_REGULATION_CC = 1 << 2,
+ STATE_PROTECT_OVP = 1 << 3,
+ STATE_PROTECT_OCP = 1 << 4,
+ STATE_PROTECT_ENABLED = 1 << 5,
+ STATE_VOLTAGE_TARGET = 1 << 6,
+ STATE_CURRENT_LIMIT = 1 << 7,
+ STATE_OVP_THRESHOLD = 1 << 8,
+ STATE_OCP_THRESHOLD = 1 << 9,
+ STATE_VOLTAGE = 1 << 10,
+ STATE_CURRENT = 1 << 11,
+ STATE_POWER = 1 << 12,
+ } mask;
+ gboolean lock;
+ gboolean output_enabled, regulation_cc;
+ gboolean protect_ovp, protect_ocp, protect_enabled;
+ float voltage_target, current_limit;
+ float ovp_threshold, ocp_threshold;
+ float voltage, current, power;