X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fyokogawa-dlm%2Fprotocol.h;h=375d4821ea94c90941075d0d2b89c239d7ea9a1f;hb=7048bb1f356305caf458862ebdf22ae0645dae66;hp=523403d5cff4699d989fe9daa43dc2eaf22bf782;hpb=584560f142e1b17b9f4ef9069bd3724f2f77e750;p=libsigrok.git diff --git a/src/hardware/yokogawa-dlm/protocol.h b/src/hardware/yokogawa-dlm/protocol.h index 523403d5..375d4821 100644 --- a/src/hardware/yokogawa-dlm/protocol.h +++ b/src/hardware/yokogawa-dlm/protocol.h @@ -31,16 +31,15 @@ #include "protocol_wrappers.h" #define LOG_PREFIX "yokogawa-dlm" -#define MAX_INSTRUMENT_VERSIONS 4 +#define MAX_INSTRUMENT_VERSIONS 8 -#define RECEIVE_BUFFER_SIZE (4096) +#define RECEIVE_BUFFER_SIZE 4096 /* See Communication Interface User's Manual on p. 268 (:WAVeform:ALL:SEND?). */ -#define DLM_MAX_FRAME_LENGTH (12500) +#define DLM_MAX_FRAME_LENGTH 12500 /* See Communication Interface User's Manual on p. 269 (:WAVeform:SEND?). */ -#define DLM_DIVISION_FOR_WORD_FORMAT (3200) -#define DLM_DIVISION_FOR_BYTE_FORMAT (12.5) - +#define DLM_DIVISION_FOR_WORD_FORMAT 3200 +#define DLM_DIVISION_FOR_BYTE_FORMAT 12.5 enum trigger_slopes { SLOPE_POSITIVE, @@ -57,11 +56,11 @@ struct scope_config { const char *(*analog_names)[]; const char *(*digital_names)[]; - const uint32_t (*hw_caps)[]; - const uint8_t num_hwcaps; + const uint32_t (*devopts)[]; + const uint8_t num_devopts; - const uint32_t (*analog_hwcaps)[]; - const uint8_t num_analog_hwcaps; + const uint32_t (*analog_devopts)[]; + const uint8_t num_analog_devopts; const char *(*coupling_options)[]; const uint8_t num_coupling_options; @@ -106,7 +105,7 @@ struct scope_state { /** Private, per-device-instance driver context. */ struct dev_context { - void *model_config; + const void *model_config; void *model_state; struct sr_channel_group **analog_groups; @@ -122,18 +121,13 @@ struct dev_context { gboolean data_pending; }; -/*--- api.c -----------------------------------------------------------------*/ SR_PRIV int dlm_data_request(const struct sr_dev_inst *sdi); - -/*--- protocol.c ------------------------------------------------------------*/ SR_PRIV int dlm_model_get(char *model_id, char **model_name, int *model_index); SR_PRIV int dlm_device_init(struct sr_dev_inst *sdi, int model_index); SR_PRIV int dlm_data_receive(int fd, int revents, void *cb_data); - SR_PRIV void dlm_scope_state_destroy(struct scope_state *state); SR_PRIV int dlm_scope_state_query(struct sr_dev_inst *sdi); SR_PRIV int dlm_sample_rate_query(const struct sr_dev_inst *sdi); - SR_PRIV int dlm_channel_data_request(const struct sr_dev_inst *sdi); #endif