]> sigrok.org Git - libsigrok.git/blobdiff - sigrok.h
OLS: Calculate actual sample rate used.
[libsigrok.git] / sigrok.h
index d0c6529a75cffdceeeb76ac5594e84e3c8080e86..b3ca41aece36fec81508c22ecba6d1e2b7b925cb 100644 (file)
--- a/sigrok.h
+++ b/sigrok.h
@@ -84,10 +84,6 @@ enum {
        SR_T_NULL,
 };
 
-enum {
-       SR_PROTO_RAW,
-};
-
 #if 0
 /* (Unused) protocol decoder stack entry */
 struct sr_protocol {
@@ -109,8 +105,10 @@ enum {
 
 struct sr_datafeed_packet {
        uint16_t type;
-       uint64_t length;
-       uint16_t unitsize;
+       /* timeoffset since start, in picoseconds */
+       uint64_t timeoffset;
+       /* duration of data in this packet, in picoseconds */
+       uint64_t duration;
        void *payload;
 };
 
@@ -118,11 +116,22 @@ struct sr_datafeed_header {
        int feed_version;
        struct timeval starttime;
        uint64_t samplerate;
-       int protocol_id;
        int num_analog_probes;
        int num_logic_probes;
 };
 
+struct sr_datafeed_logic {
+       uint64_t length;
+       uint16_t unitsize;
+       void *data;
+};
+
+struct sr_datafeed_pd {
+       char *protocol;
+       char *annotation;
+       unsigned char *data;
+};
+
 #if defined(HAVE_LA_ALSA)
 struct sr_analog_probe {
        uint8_t att;
@@ -246,6 +255,9 @@ enum {
        /** The device supports setting a pattern (pattern generator mode). */
        SR_HWCAP_PATTERN_MODE,
 
+       /** The device supports Run Length Encoding. */
+       SR_HWCAP_RLE,
+
        /*--- Special stuff -------------------------------------------------*/
 
        /* TODO: Better description. */