X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=sigrok.h;h=c3629831d3662124f1708b399e1a18a276c5c410;hb=9a751023136a058dadf008a4ff983351947cc0df;hp=a33cd7f487be8dd3a7ff2d76b571d8a3ea4f2537;hpb=e88dadd77cd9fcb4fc0e85eeb6c41155847529ad;p=libsigrok.git diff --git a/sigrok.h b/sigrok.h index a33cd7f4..c3629831 100644 --- a/sigrok.h +++ b/sigrok.h @@ -68,11 +68,12 @@ extern "C" { #define SR_HZ_TO_NS(n) (1000000000 / (n)) /* libsigrok loglevels. */ -#define SR_LOG_NONE 0 -#define SR_LOG_ERR 1 -#define SR_LOG_WARN 2 -#define SR_LOG_INFO 3 -#define SR_LOG_DBG 4 +#define SR_LOG_NONE 0 +#define SR_LOG_ERR 1 +#define SR_LOG_WARN 2 +#define SR_LOG_INFO 3 +#define SR_LOG_DBG 4 +#define SR_LOG_SPEW 5 typedef int (*sr_receive_data_callback) (int fd, int revents, void *user_data); @@ -83,10 +84,6 @@ enum { SR_T_NULL, }; -enum { - SR_PROTO_RAW, -}; - #if 0 /* (Unused) protocol decoder stack entry */ struct sr_protocol { @@ -108,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; }; @@ -117,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;