X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fscpi-pps%2Fprofiles.c;h=925b6db84599666261b326f4802c9458c9826b05;hb=584560f142e1b17b9f4ef9069bd3724f2f77e750;hp=890fbcce943c47af860ed57a7c82eb171853eafa;hpb=3222ee103d008fa25a125e51536d13a03a010c6a;p=libsigrok.git diff --git a/src/hardware/scpi-pps/profiles.c b/src/hardware/scpi-pps/profiles.c index 890fbcce..925b6db8 100644 --- a/src/hardware/scpi-pps/profiles.c +++ b/src/hardware/scpi-pps/profiles.c @@ -24,6 +24,7 @@ const char *pps_vendors[][2] = { { "RIGOL TECHNOLOGIES", "Rigol" }, + { "HEWLETT-PACKARD", "HP" }, }; const char *get_vendor(const char *raw_vendor) @@ -38,14 +39,16 @@ const char *get_vendor(const char *raw_vendor) return raw_vendor; } +static const uint32_t devopts_none[] = { }; + /* Rigol DP800 series */ -static const int32_t rigol_dp800_devopts[] = { +static const uint32_t rigol_dp800_devopts[] = { SR_CONF_POWER_SUPPLY, SR_CONF_CONTINUOUS, SR_CONF_OVER_TEMPERATURE_PROTECTION, }; -static const int32_t rigol_dp800_devopts_cg[] = { +static const uint32_t rigol_dp800_devopts_cg[] = { SR_CONF_OUTPUT_REGULATION, SR_CONF_OVER_VOLTAGE_PROTECTION_ENABLED, SR_CONF_OVER_VOLTAGE_PROTECTION_ACTIVE, @@ -104,7 +107,47 @@ struct scpi_command rigol_dp800_cmd[] = { { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_THRESHOLD, ":OUTP:OCP:VAL CH%s,%.6f" }, }; +/* HP 663xx series */ +static const uint32_t hp_6632b_devopts[] = { + SR_CONF_POWER_SUPPLY, + SR_CONF_CONTINUOUS, + SR_CONF_OUTPUT_ENABLED, + SR_CONF_OUTPUT_VOLTAGE, + SR_CONF_OUTPUT_CURRENT, + SR_CONF_OUTPUT_VOLTAGE_MAX, + SR_CONF_OUTPUT_CURRENT_MAX, +}; + +struct channel_spec hp_6632b_ch[] = { + { "1", { 0, 20.475, 0.005 }, { 0, 5.1188, 0.00132 } }, +}; + +struct channel_group_spec hp_6632b_cg[] = { + { "1", CH_IDX(0), 0 }, +}; + +struct scpi_command hp_6632b_cmd[] = { + { SCPI_CMD_GET_OUTPUT_ENABLED, "OUTP:STAT?" }, + { SCPI_CMD_SET_OUTPUT_ENABLED, "OUTP:STAT %s" }, + { SCPI_CMD_GET_MEAS_VOLTAGE, ":MEAS:VOLT?" }, + { SCPI_CMD_GET_MEAS_CURRENT, ":MEAS:CURR?" }, + { SCPI_CMD_GET_VOLTAGE_MAX, ":SOUR:VOLT?" }, + { SCPI_CMD_SET_VOLTAGE_MAX, ":SOUR:VOLT %.6f" }, + { SCPI_CMD_GET_CURRENT_MAX, ":SOUR:CURR?" }, + { SCPI_CMD_SET_CURRENT_MAX, ":SOUR:CURR %.6f" }, +}; + + SR_PRIV const struct scpi_pps pps_profiles[] = { + /* HP 6632B */ + { "HP", "6632B", 0, + ARRAY_AND_SIZE(hp_6632b_devopts), + ARRAY_AND_SIZE(devopts_none), + ARRAY_AND_SIZE(hp_6632b_ch), + ARRAY_AND_SIZE(hp_6632b_cg), + ARRAY_AND_SIZE(hp_6632b_cmd), + }, + /* Rigol DP800 series */ { "Rigol", "^DP831A$", PPS_OTP, ARRAY_AND_SIZE(rigol_dp800_devopts),