X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Frdtech-dps%2Fprotocol.h;h=1170dbf99baabb7d7d8b158f703c8f3e920fa3b1;hb=HEAD;hp=72b7be7c72130a4746ac693d2b828b1dec157d0f;hpb=02a4f485de76b401eca7d3b82aac1808a12df4fe;p=libsigrok.git diff --git a/src/hardware/rdtech-dps/protocol.h b/src/hardware/rdtech-dps/protocol.h index 72b7be7c..1170dbf9 100644 --- a/src/hardware/rdtech-dps/protocol.h +++ b/src/hardware/rdtech-dps/protocol.h @@ -22,7 +22,7 @@ #ifndef LIBSIGROK_HARDWARE_RDTECH_DPS_PROTOCOL_H #define LIBSIGROK_HARDWARE_RDTECH_DPS_PROTOCOL_H -#include +#include "config.h" #include #include @@ -51,8 +51,8 @@ struct rdtech_dps_model { enum rdtech_dps_model_type model_type; unsigned int id; const char *name; - struct rdtech_dps_range *ranges; - unsigned int n_ranges; + const struct rdtech_dps_range *ranges; + size_t n_ranges; }; struct dev_context { @@ -65,7 +65,7 @@ struct dev_context { gboolean curr_ocp_state; gboolean curr_cc_state; gboolean curr_out_state; - unsigned int curr_range; + size_t curr_range; gboolean acquisition_started; }; @@ -93,7 +93,7 @@ struct rdtech_dps_state { float voltage_target, current_limit; float ovp_threshold, ocp_threshold; float voltage, current, power; - unsigned int range; + size_t range; }; enum rdtech_dps_state_context {