X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Frigol-ds1xx2%2Fprotocol.h;h=fa056030f4e49ee10e54338f1221c373281d1607;hb=861c447bfb020a59ac9d197c4a74a4e8ea3998bf;hp=0a5f14c309201624094fc819c32829fd5295ff85;hpb=f4816ac6cc2403558276ada44d3e14eb4a9b3d15;p=libsigrok.git diff --git a/hardware/rigol-ds1xx2/protocol.h b/hardware/rigol-ds1xx2/protocol.h index 0a5f14c3..fa056030 100644 --- a/hardware/rigol-ds1xx2/protocol.h +++ b/hardware/rigol-ds1xx2/protocol.h @@ -33,8 +33,13 @@ #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 + /** Private, per-device-instance driver context. */ struct dev_context { + /** The current frame limit. */ + uint64_t limit_frames; + /** The current sampling limit (in number of samples). */ uint64_t limit_samples; @@ -44,10 +49,29 @@ struct dev_context { /** Opaque pointer passed in by the frontend. */ void *cb_data; + /** The current number of already received frames. */ + uint64_t num_frames; + /** The current number of already received samples. */ uint64_t num_samples; + + /** Current scale setting. */ + float scale; + + /** Current offset setting. */ + float offset; + + /** Path to USBTMC character device file. */ + char *device; + + /** USBTMC character device file descriptor. */ + int fd; + + GSList *enabled_probes; }; SR_PRIV int rigol_ds1xx2_receive_data(int fd, int revents, void *cb_data); +SR_PRIV int rigol_ds1xx2_send_data(int fd, const char *format, ...); + #endif