X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fscpi-pps%2Fprotocol.h;h=d6695addbcca951e0dca1aee9ce72f6c9879ed7f;hb=cac58676e987d06b890366ac4078a1e4fb1cbdc3;hp=19902ccc0c40dfde72e9f1348b0c2809ebd531f6;hpb=9e45cd41fd1618238c8a3afc56d4031c984bc3c5;p=libsigrok.git diff --git a/src/hardware/scpi-pps/protocol.h b/src/hardware/scpi-pps/protocol.h index 19902ccc..d6695add 100644 --- a/src/hardware/scpi-pps/protocol.h +++ b/src/hardware/scpi-pps/protocol.h @@ -51,8 +51,6 @@ enum pps_scpi_cmds { SCPI_CMD_GET_OVER_CURRENT_PROTECTION_ACTIVE, SCPI_CMD_GET_OVER_CURRENT_PROTECTION_THRESHOLD, SCPI_CMD_SET_OVER_CURRENT_PROTECTION_THRESHOLD, - SCPI_CMD_GET_OUTPUT_CHANNEL_CONFIG, - SCPI_CMD_SET_OUTPUT_CHANNEL_CONFIG, }; /* @@ -70,10 +68,8 @@ enum pps_features { }; struct scpi_pps { - int vendor_id; char *vendor; - char *idn_vendor; - char *idn_model; + char *model; uint64_t features; const int32_t *devopts; unsigned int num_devopts; @@ -105,6 +101,18 @@ struct channel_group_spec { uint64_t features; }; +struct pps_channel { + int mq; + unsigned int hw_output_idx; + char *hwname; +}; + +struct pps_channel_instance { + int mq; + int command; + char *prefix; +}; + struct pps_channel_group { uint64_t features; }; @@ -126,11 +134,14 @@ struct dev_context { /* Operational state */ /* Temporary state across callbacks */ - int state; struct sr_channel *cur_channel; }; +const char *get_vendor(const char *raw_vendor); +SR_PRIV 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, + const GVariantType *gvtype, int command, ...); SR_PRIV int scpi_pps_receive_data(int fd, int revents, void *cb_data); #endif