X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=sigrok.h;h=1ba03b6313b6ff4cb67cd8570fa601eea8e11b01;hb=62eeeb171bd9a05d167990373e33bc1f956cbfee;hp=2f31a34b252421555525f752529b247da4e96da5;hpb=484760d1a8a26ba830b3d63d1451dc30985babd1;p=libsigrok.git diff --git a/sigrok.h b/sigrok.h index 2f31a34b..1ba03b63 100644 --- a/sigrok.h +++ b/sigrok.h @@ -27,6 +27,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + /* * Status/error codes returned by libsigrok functions. * @@ -113,6 +117,17 @@ struct datafeed_header { int num_logic_probes; }; +struct analog_probe { + uint8_t att; + uint8_t res; /* Needs to be a power of 2, FIXME */ + uint16_t val; /* Max hardware ADC width is 16bits */ +}; + +struct analog_sample { + uint8_t num_probes; /* Max hardware probes is 256 */ + struct analog_probe probes[]; +}; + struct input { struct input_format *format; char *param; @@ -175,6 +190,7 @@ struct device { struct device_plugin *plugin; /* A plugin may handle multiple devices of the same type */ int plugin_index; + uint8_t probe_type; /* List of struct probe* */ GSList *probes; /* Data acquired by this device, if any */ @@ -188,7 +204,6 @@ enum { struct probe { int index; - int type; gboolean enabled; char *name; char *trigger; @@ -282,6 +297,8 @@ enum { DI_CUR_SAMPLERATE, /* Supported pattern generator modes */ DI_PATTERNMODES, + /* Probes type, DF_ANALOG needs this to be PROBE_TYPE_ANALOG */ + DI_PROBE_TYPE, }; /* @@ -333,4 +350,8 @@ struct session { #include "sigrok-proto.h" +#ifdef __cplusplus +} +#endif + #endif