X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Frigol-ds%2Fprotocol.h;h=3b17299114bb244e16685662174b1b5a4e496353;hb=fdf0744fa4b40adab32e8f10d84df784284c67cc;hp=631c81dbb8fab4dbe1a02d8467711b05e5c3975a;hpb=702f42e8eb33d8d1ffb5b748097428c0f4434c6d;p=libsigrok.git diff --git a/src/hardware/rigol-ds/protocol.h b/src/hardware/rigol-ds/protocol.h index 631c81db..3b172991 100644 --- a/src/hardware/rigol-ds/protocol.h +++ b/src/hardware/rigol-ds/protocol.h @@ -23,16 +23,16 @@ #include #include -#include "libsigrok.h" +#include #include "libsigrok-internal.h" #define LOG_PREFIX "rigol-ds" /* Size of acquisition buffers */ -#define ACQ_BUFFER_SIZE 32768 +#define ACQ_BUFFER_SIZE (32 * 1024) /* Maximum number of samples to retrieve at once. */ -#define ACQ_BLOCK_SIZE 30000 +#define ACQ_BLOCK_SIZE (30 * 1000) #define MAX_ANALOG_CHANNELS 4 #define MAX_DIGITAL_CHANNELS 16 @@ -89,9 +89,7 @@ enum wait_events { WAIT_STOP, /* Wait for scope stopping (only single shots) */ }; -/** Private, per-device-instance driver context. */ struct dev_context { - /* Device model */ const struct rigol_ds_model *model; enum data_format format; @@ -108,7 +106,6 @@ struct dev_context { /* Acquisition settings */ GSList *enabled_channels; uint64_t limit_frames; - void *cb_data; enum data_source data_source; uint64_t analog_frame_size; uint64_t digital_frame_size; @@ -118,16 +115,16 @@ struct dev_context { gboolean digital_channels[MAX_DIGITAL_CHANNELS]; gboolean la_enabled; float timebase; + float attenuation[MAX_ANALOG_CHANNELS]; float vdiv[MAX_ANALOG_CHANNELS]; int vert_reference[MAX_ANALOG_CHANNELS]; float vert_offset[MAX_ANALOG_CHANNELS]; char *trigger_source; float horiz_triggerpos; char *trigger_slope; + float trigger_level; char *coupling[MAX_ANALOG_CHANNELS]; - /* Operational state */ - /* Number of frames received in total. */ uint64_t num_frames; /* GSList entry for the current channel. */ @@ -154,5 +151,6 @@ SR_PRIV int rigol_ds_capture_start(const struct sr_dev_inst *sdi); SR_PRIV int rigol_ds_channel_start(const struct sr_dev_inst *sdi); SR_PRIV int rigol_ds_receive(int fd, int revents, void *cb_data); SR_PRIV int rigol_ds_get_dev_cfg(const struct sr_dev_inst *sdi); +SR_PRIV int rigol_ds_get_dev_cfg_vertical(const struct sr_dev_inst *sdi); #endif