From: Uwe Hermann Date: Thu, 7 May 2015 01:15:35 +0000 (+0200) Subject: scpi-pps: Minor cleanups. X-Git-Tag: libsigrok-0.4.0~505 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=562a34908e47cf3b698a822b2e8177dc26422358;p=libsigrok.git scpi-pps: Minor cleanups. --- diff --git a/src/hardware/scpi-pps/api.c b/src/hardware/scpi-pps/api.c index c1b4aca4..d4aa4923 100644 --- a/src/hardware/scpi-pps/api.c +++ b/src/hardware/scpi-pps/api.c @@ -22,8 +22,6 @@ #include "protocol.h" SR_PRIV struct sr_dev_driver scpi_pps_driver_info; -extern unsigned int num_pps_profiles; -extern const struct scpi_pps pps_profiles[]; static const uint32_t scanopts[] = { SR_CONF_CONN, diff --git a/src/hardware/scpi-pps/profiles.c b/src/hardware/scpi-pps/profiles.c index 02f6940a..a064991f 100644 --- a/src/hardware/scpi-pps/profiles.c +++ b/src/hardware/scpi-pps/profiles.c @@ -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" }, }; diff --git a/src/hardware/scpi-pps/protocol.h b/src/hardware/scpi-pps/protocol.h index e1ed8cb8..4956e5d4 100644 --- a/src/hardware/scpi-pps/protocol.h +++ b/src/hardware/scpi-pps/protocol.h @@ -156,7 +156,10 @@ struct dev_context { struct sr_channel *cur_channel; }; -const char *get_vendor(const char *raw_vendor); +SR_PRIV extern unsigned int num_pps_profiles; +SR_PRIV extern const struct scpi_pps pps_profiles[]; + +SR_PRIV const char *get_vendor(const char *raw_vendor); SR_PRIV const char *scpi_cmd_get(const struct sr_dev_inst *sdi, int command); SR_PRIV int scpi_cmd(const struct sr_dev_inst *sdi, int command, ...); SR_PRIV int scpi_cmd_resp(const struct sr_dev_inst *sdi, GVariant **gvar,