]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/scpi-pps/profiles.c
Rename SR_CONF_OUTPUT_* to SR_CONF_*.
[libsigrok.git] / src / hardware / scpi-pps / profiles.c
index 02f6940a70f0595ac27981e952dfc19f942df969..e860e9de8cbb1bbc82f0d915af4271b646c8f2b6 100644 (file)
@@ -34,7 +34,7 @@ static const char *pps_vendors[][2] = {
        { "Agilent Technologies", "Agilent" },
 };
 
-const char *get_vendor(const char *raw_vendor)
+SR_PRIV const char *get_vendor(const char *raw_vendor)
 {
        unsigned int i;
 
@@ -73,7 +73,7 @@ static const struct channel_group_spec agilent_n5767a_cg[] = {
 
 /*
  * TODO: OVER_CURRENT_PROTECTION_ACTIVE status can be determined by the OC bit
- * in STAT:QUES:EVEN?, but this is not implemented
+ * in STAT:QUES:EVEN?, but this is not implemented.
  */
 static const struct scpi_command agilent_n5700a_cmd[] = {
        { SCPI_CMD_REMOTE, "SYST:COMM:RLST REM" },
@@ -92,7 +92,7 @@ static const struct scpi_command agilent_n5700a_cmd[] = {
        { SCPI_CMD_GET_OVER_CURRENT_PROTECTION_ENABLED, ":CURR:PROT:STAT?" },
        { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_ENABLE, ":CURR:PROT:STAT ON?"},
        { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_DISABLE, ":CURR:PROT:STAT OFF?"},
-       /* Current limit (CC mode) and OCP are set using the same cmd. sad */
+       /* Current limit (CC mode) and OCP are set using the same command. */
        { SCPI_CMD_GET_OVER_CURRENT_PROTECTION_THRESHOLD, ":SOUR:CURR?" },
        { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_THRESHOLD, ":SOUR:CURR %.6f" },
 };
@@ -137,7 +137,7 @@ static const struct scpi_command chroma_61604_cmd[] = {
        { SCPI_CMD_SET_OUTPUT_DISABLE, ":OUTP OFF" },
        { SCPI_CMD_GET_OVER_VOLTAGE_PROTECTION_THRESHOLD, ":SOUR:VOLT:LIM:AC?" },
        { SCPI_CMD_SET_OVER_VOLTAGE_PROTECTION_THRESHOLD, ":SOUR:VOLT:LIM:AC %.1f" },
-       /* This is not a current limit mode. It is overcurrent protection */
+       /* This is not a current limit mode. It is overcurrent protection. */
        { SCPI_CMD_GET_OVER_CURRENT_PROTECTION_THRESHOLD, ":SOUR:CURR:LIM?" },
        { SCPI_CMD_SET_OVER_CURRENT_PROTECTION_THRESHOLD, ":SOUR:CURR:LIM %.2f" },
 };
@@ -149,18 +149,18 @@ static const uint32_t rigol_dp800_devopts[] = {
 };
 
 static const uint32_t rigol_dp800_devopts_cg[] = {
-       SR_CONF_OUTPUT_REGULATION | SR_CONF_GET,
+       SR_CONF_REGULATION | SR_CONF_GET,
        SR_CONF_OVER_VOLTAGE_PROTECTION_ENABLED | SR_CONF_GET | SR_CONF_SET,
        SR_CONF_OVER_VOLTAGE_PROTECTION_ACTIVE | SR_CONF_GET,
        SR_CONF_OVER_VOLTAGE_PROTECTION_THRESHOLD | SR_CONF_GET | SR_CONF_SET,
        SR_CONF_OVER_CURRENT_PROTECTION_ENABLED | SR_CONF_GET | SR_CONF_SET,
        SR_CONF_OVER_CURRENT_PROTECTION_ACTIVE | SR_CONF_GET,
        SR_CONF_OVER_CURRENT_PROTECTION_THRESHOLD | SR_CONF_GET | SR_CONF_SET,
-       SR_CONF_OUTPUT_VOLTAGE | SR_CONF_GET,
-       SR_CONF_OUTPUT_VOLTAGE_TARGET | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
-       SR_CONF_OUTPUT_CURRENT | SR_CONF_GET,
-       SR_CONF_OUTPUT_CURRENT_LIMIT | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
-       SR_CONF_OUTPUT_ENABLED | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_VOLTAGE | SR_CONF_GET,
+       SR_CONF_VOLTAGE_TARGET | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_CURRENT | SR_CONF_GET,
+       SR_CONF_CURRENT_LIMIT | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_ENABLED | SR_CONF_GET | SR_CONF_SET,
 };
 
 static const struct channel_spec rigol_dp821a_ch[] = {
@@ -229,11 +229,11 @@ static const struct scpi_command rigol_dp800_cmd[] = {
 /* HP 663xx series */
 static const uint32_t hp_6632b_devopts[] = {
        SR_CONF_CONTINUOUS | SR_CONF_SET,
-       SR_CONF_OUTPUT_ENABLED | SR_CONF_GET | SR_CONF_SET,
-       SR_CONF_OUTPUT_VOLTAGE | SR_CONF_GET,
-       SR_CONF_OUTPUT_CURRENT | SR_CONF_GET,
-       SR_CONF_OUTPUT_VOLTAGE_TARGET | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
-       SR_CONF_OUTPUT_CURRENT_LIMIT | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_ENABLED | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_VOLTAGE | SR_CONF_GET,
+       SR_CONF_CURRENT | SR_CONF_GET,
+       SR_CONF_VOLTAGE_TARGET | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_CURRENT_LIMIT | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
 };
 
 static const struct channel_spec hp_6632b_ch[] = {
@@ -262,16 +262,16 @@ static const uint32_t philips_pm2800_devopts[] = {
 };
 
 static const uint32_t philips_pm2800_devopts_cg[] = {
-       SR_CONF_OUTPUT_ENABLED | SR_CONF_GET | SR_CONF_SET,
-       SR_CONF_OUTPUT_VOLTAGE | SR_CONF_GET,
-       SR_CONF_OUTPUT_VOLTAGE_TARGET | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
-       SR_CONF_OUTPUT_CURRENT | SR_CONF_GET,
-       SR_CONF_OUTPUT_CURRENT_LIMIT | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_ENABLED | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_VOLTAGE | SR_CONF_GET,
+       SR_CONF_VOLTAGE_TARGET | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+       SR_CONF_CURRENT | SR_CONF_GET,
+       SR_CONF_CURRENT_LIMIT | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
        SR_CONF_OVER_VOLTAGE_PROTECTION_ACTIVE | SR_CONF_GET,
        SR_CONF_OVER_VOLTAGE_PROTECTION_THRESHOLD | SR_CONF_GET | SR_CONF_SET,
        SR_CONF_OVER_CURRENT_PROTECTION_ENABLED | SR_CONF_GET | SR_CONF_SET,
        SR_CONF_OVER_CURRENT_PROTECTION_ACTIVE | SR_CONF_GET,
-       SR_CONF_OUTPUT_REGULATION | SR_CONF_GET,
+       SR_CONF_REGULATION | SR_CONF_GET,
 };
 
 enum philips_pm2800_modules {