]> sigrok.org Git - libsigrok.git/blobdiff - hardware/rigol-ds1xx2/protocol.h
fx2lafw: Use standard dev_clear() instead
[libsigrok.git] / hardware / rigol-ds1xx2 / protocol.h
index 4026fc162ac63788e209002de76ae43c91e6e0f8..34d9e8adf42d57fa6599ce8686e03b4babc613c7 100644 (file)
 #define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
 #define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
 
-#define WAVEFORM_SIZE 600
+#define ANALOG_WAVEFORM_SIZE 600
+#define DIGITAL_WAVEFORM_SIZE 1210
 
 /** Private, per-device-instance driver context. */
 struct dev_context {
+       /* Device features */
+       gboolean has_digital;
+
        /* Acquisition settings */
-       GSList *enabled_probes;
+       GSList *enabled_analog_probes;
+       GSList *enabled_digital_probes;
        uint64_t limit_frames;
        void *cb_data;
 
        /* Device settings */
-       gboolean channels[2];
+       gboolean analog_channels[2];
+       gboolean digital_channels[16];
        float timebase;
        float vdiv[2];
        float vert_offset[2];
@@ -57,7 +63,7 @@ struct dev_context {
        char *device;
        int fd;
        uint64_t num_frames;
-       uint64_t num_frame_samples;
+       uint64_t num_frame_bytes;
        struct sr_probe *channel_frame;
 };