X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=libsigrok.h;h=2c117be1af5aef0b7664426e3b813a0289a6e1a1;hb=17548571cc836edaf45e4707e74f6537605fc924;hp=4492c0409bcb589a6fa14806c58896f3714349a6;hpb=dd96ea98793ed089f1b0a7dd31f417774f14ad80;p=libsigrok.git diff --git a/libsigrok.h b/libsigrok.h index 4492c040..2c117be1 100644 --- a/libsigrok.h +++ b/libsigrok.h @@ -286,6 +286,7 @@ struct sr_datafeed_logic { }; struct sr_datafeed_analog { + /** The probes for which data is included in this packet. */ GSList *probes; int num_samples; /** Measured quantity (voltage, current, temperature, and so on). */ @@ -294,7 +295,8 @@ struct sr_datafeed_analog { int unit; /** Bitmap with extra information about the MQ. */ uint64_t mqflags; - /** The analog value. */ + /** The analog value(s). The data is interleaved according to + * the probes list. */ float *data; }; @@ -388,7 +390,7 @@ enum { /** The device can measure humidity. */ SR_CONF_HYGROMETER, - /*--- Driver options ------------------------------------------------*/ + /*--- Driver scan options -------------------------------------------*/ /** * Specification on how to connect to a device. @@ -461,20 +463,26 @@ enum { /** Coupling. */ SR_CONF_COUPLING, + /** Trigger types. */ + SR_CONF_TRIGGER_TYPE, + /*--- Special stuff -------------------------------------------------*/ + /** Scan options supported by the driver. */ + SR_CONF_SCAN_OPTIONS = 40000, + + /** Device options for a particular device. */ + SR_CONF_DEVICE_OPTIONS, + /** Session filename. */ - SR_CONF_SESSIONFILE = 40000, + SR_CONF_SESSIONFILE, - /* TODO: Better description. */ /** The device supports specifying a capturefile to inject. */ SR_CONF_CAPTUREFILE, - /* TODO: Better description. */ /** The device supports specifying the capturefile unit size. */ SR_CONF_CAPTURE_UNITSIZE, - /* TODO: Better description. */ /** The device supports setting the number of probes. */ SR_CONF_CAPTURE_NUM_PROBES, @@ -540,33 +548,6 @@ enum { SR_ST_STOPPING, }; -/* - * TODO: This sucks, you just kinda have to "know" the returned type. - * TODO: Need a DI to return the number of trigger stages supported. - */ - -/** Device info IDs. */ -enum { - /** A list of options supported by the driver. */ - SR_DI_HWOPTS = 10000, - /** A list of capabilities supported by the device. */ - SR_DI_HWCAPS, - /** Types of logic trigger supported, out of "01crf" (char *). */ - SR_DI_TRIGGER_TYPES, - /** Supported buffer sizes. */ - SR_DI_BUFFERSIZES, - /** Supported time bases. */ - SR_DI_TIMEBASES, - /** Supported trigger sources. */ - SR_DI_TRIGGER_SOURCES, - /** Supported filter targets. */ - SR_DI_FILTERS, - /** Valid volts/div values. */ - SR_DI_VDIVS, - /** Coupling options. */ - SR_DI_COUPLING, -}; - /* * A device supports either a range of samplerates with steps of a given * granularity, or is limited to a set of defined samplerates. Use either