]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/appa-55ii/protocol.h
Add sr_dev_acquisition_start(), factor out SR_ERR_DEV_CLOSED check.
[libsigrok.git] / src / hardware / appa-55ii / protocol.h
index 23b59b95733fd466c0bf9c6a8092ff308fcf0ccf..248d672e1970b15e38352ddf61b1de02e3ca7396 100644 (file)
@@ -27,9 +27,9 @@
 
 #define LOG_PREFIX "appa-55ii"
 
-#define APPA_55II_NUM_CHANNELS  2
-#define APPA_55II_BUF_SIZE    (4 + 32 + 1)
-#define DEFAULT_DATA_SOURCE   DATA_SOURCE_LIVE
+#define APPA_55II_NUM_CHANNELS 2
+#define APPA_55II_BUF_SIZE     (4 + 32 + 1)
+#define DEFAULT_DATA_SOURCE    DATA_SOURCE_LIVE
 
 enum {
        DATA_SOURCE_LIVE,
@@ -39,13 +39,8 @@ enum {
 /** Private, per-device-instance driver context. */
 struct dev_context {
        /* Acquisition settings */
-       uint64_t limit_samples;   /**< The sampling limit (in number of samples). */
-       uint64_t limit_msec;      /**< The time limit (in milliseconds). */
-       gboolean data_source;     /**< Whether to read live samples or memory */
-
-       /* Operational state */
-       uint64_t num_samples;     /**< The number of already received samples. */
-       int64_t start_time;       /**< The time at which sampling started. */
+       struct sr_sw_limits limits;
+       gboolean data_source; /**< Whether to read live samples or memory */
 
        /* Temporary state across callbacks */
        uint8_t buf[APPA_55II_BUF_SIZE];