]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/siglent-sds/protocol.h
siglent-sds: Fix two memory leaks.
[libsigrok.git] / src / hardware / siglent-sds / protocol.h
index 198fa757c510778bb90e92a5e1659bdfb9bddeec..a68d16c65a4efcfb434fe225091b42ac5b4b1a60 100644 (file)
@@ -47,10 +47,6 @@ enum protocol_version {
        NON_SPO_MODEL,
 };
 
-enum data_format {
-       FORMAT_IEEE488_2,
-};
-
 enum data_source {
        DATA_SOURCE_SCREEN,
        DATA_SOURCE_HISTORY,
@@ -59,7 +55,6 @@ enum data_source {
 struct siglent_sds_vendor {
        const char *name;
        const char *full_name;
-       const char *usb_name;
 };
 
 struct siglent_sds_series {
@@ -89,7 +84,6 @@ 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 siglent_sds_model *model;
@@ -111,8 +105,8 @@ struct dev_context {
        uint64_t analog_frame_size;
        uint64_t digital_frame_size;
        uint64_t num_samples;
-       long blockHeaderSize;
-       float sampleRate;
+       long block_header_size;
+       float samplerate;
 
        /* Device settings */
        gboolean analog_channels[MAX_ANALOG_CHANNELS];
@@ -137,17 +131,17 @@ struct dev_context {
        GSList *channel_entry;
        /* Number of bytes received for current channel. */
        uint64_t num_channel_bytes;
-       /* Number of bytes of block header read */
+       /* Number of bytes of block header read. */
        uint64_t num_header_bytes;
-       /* Number of bytes in current data block, if 0 block header expected */
+       /* Number of bytes in current data block, if 0 block header expected. */
        uint64_t num_block_bytes;
-       /* Number of data block bytes already read */
+       /* Number of data block bytes already read. */
        uint64_t num_block_read;
-       /* What to wait for in *_receive */
+       /* What to wait for in *_receive. */
        enum wait_events wait_event;
-       /* Trigger/block copying/stop waiting status */
+       /* Trigger/block copying/stop waiting status. */
        int wait_status;
-       /* Acq buffers used for reading from the scope and sending data to app */
+       /* Acq buffers used for reading from the scope and sending data to app. */
        unsigned char *buffer;
        float *data;
 };