X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fsiglent-sds%2Fprotocol.h;h=b0c926ed0ec9a7cf8a75aebc274419504696a23c;hb=49f7cb24259851b1b8b5c5fc863343c90a7366a4;hp=0a7e5f3a0fb869433f91806b0280623428b9e11f;hpb=3e7fb88f21d9b6d87652af2d988c83d8481592de;p=libsigrok.git diff --git a/src/hardware/siglent-sds/protocol.h b/src/hardware/siglent-sds/protocol.h index 0a7e5f3a..b0c926ed 100644 --- a/src/hardware/siglent-sds/protocol.h +++ b/src/hardware/siglent-sds/protocol.h @@ -32,6 +32,8 @@ //#define ACQ_BUFFER_SIZE (6000000) #define ACQ_BUFFER_SIZE (18000000) +#define SIGLENT_HEADER_SIZE 351 + /* Maximum number of samples to retrieve at once. */ #define ACQ_BLOCK_SIZE (30 * 1000) @@ -55,7 +57,6 @@ enum data_source { struct siglent_sds_vendor { const char *name; const char *full_name; - const char *usb_name; }; struct siglent_sds_series { @@ -102,12 +103,15 @@ struct dev_context { /* Acquisition settings */ GSList *enabled_channels; uint64_t limit_frames; + uint64_t average_samples; + gboolean average_enabled; enum data_source data_source; uint64_t analog_frame_size; uint64_t digital_frame_size; uint64_t num_samples; - long blockHeaderSize; - float sampleRate; + uint64_t memory_depth; + long block_header_size; + float samplerate; /* Device settings */ gboolean analog_channels[MAX_ANALOG_CHANNELS]; @@ -134,10 +138,10 @@ struct dev_context { uint64_t num_channel_bytes; /* 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 data blocks bytes already read. */ uint64_t num_block_bytes; - /* Number of data block bytes already read. */ - uint64_t num_block_read; + /* Number of data blocks read. */ + int num_block_read; /* What to wait for in *_receive. */ enum wait_events wait_event; /* Trigger/block copying/stop waiting status. */