]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/rigol-ds/protocol.h
rigol-ds: Store trigger sources and their number for each model
[libsigrok.git] / src / hardware / rigol-ds / protocol.h
index 787adffbbddee1d4a581aa8b6b3a1b50dba460e4..840b1b274e2b17a0f917cf772bd6d4abfbd41e46 100644 (file)
@@ -80,6 +80,8 @@ struct rigol_ds_model {
        uint64_t min_timebase[2];
        unsigned int analog_channels;
        bool has_digital;
+       const char **trigger_sources;
+       unsigned int num_trigger_sources;
 };
 
 enum wait_events {
@@ -89,9 +91,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;
 
@@ -117,16 +117,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. */