X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=include%2Flibsigrok%2Flibsigrok.h;h=544bb08bfc8a36c74dd6f8ffc20fce1e48342d52;hb=5ec172d7e9ed55537b6a152a6b8e98712a2f595e;hp=5309efbdbb55fd34c426a6ab5e14f8df030e9e3c;hpb=2c24077466a299ead689c90f01f55f6d86c7386b;p=libsigrok.git diff --git a/include/libsigrok/libsigrok.h b/include/libsigrok/libsigrok.h index 5309efbd..544bb08b 100644 --- a/include/libsigrok/libsigrok.h +++ b/include/libsigrok/libsigrok.h @@ -383,6 +383,8 @@ enum sr_mqflag { SR_MQFLAG_REFERENCE = 0x80000, /** Unstable value (hasn't settled yet). */ SR_MQFLAG_UNSTABLE = 0x100000, + /** Measurement is four wire (e.g. Kelvin connection). */ + SR_MQFLAG_FOUR_WIRE = 0x200000, /* * Update mq_strings[] (analog.c) and fancyprint() (output/analog.c) @@ -652,10 +654,15 @@ struct sr_key_info { const char *description; }; -#define SR_CONF_GET (1 << 31) -#define SR_CONF_SET (1 << 30) -#define SR_CONF_LIST (1 << 29) -#define SR_CONF_MASK 0x1fffffff +/** Configuration capabilities. */ +enum sr_configcap { + /** Value can be read. */ + SR_CONF_GET = (1 << 31), + /** Value can be written. */ + SR_CONF_SET = (1 << 30), + /** Possible values can be enumerated. */ + SR_CONF_LIST = (1 << 29), +}; /** Configuration keys */ enum sr_configkey { @@ -971,18 +978,18 @@ enum sr_configkey { /** Over-temperature protection (OTP) active. */ SR_CONF_OVER_TEMPERATURE_PROTECTION_ACTIVE, - /* Update sr_key_info_config[] (hwdriver.c) upon changes! */ + /** Under-voltage condition. */ + SR_CONF_UNDER_VOLTAGE_CONDITION, - /*--- Special stuff -------------------------------------------------*/ + /** Under-voltage condition active. */ + SR_CONF_UNDER_VOLTAGE_CONDITION_ACTIVE, - /** Scan options supported by the driver. */ - SR_CONF_SCAN_OPTIONS = 40000, + /* Update sr_key_info_config[] (hwdriver.c) upon changes! */ - /** Device options for a particular device. */ - SR_CONF_DEVICE_OPTIONS, + /*--- Special stuff -------------------------------------------------*/ /** Session filename. */ - SR_CONF_SESSIONFILE, + SR_CONF_SESSIONFILE = 40000, /** The device supports specifying a capturefile to inject. */ SR_CONF_CAPTUREFILE, @@ -1010,6 +1017,9 @@ enum sr_configkey { /** The device supports setting a probe factor. */ SR_CONF_PROBE_FACTOR, + /** Number of powerline cycles for ADC integration time. */ + SR_CONF_ADC_POWERLINE_CYCLES, + /* Update sr_key_info_config[] (hwdriver.c) upon changes! */ /*--- Acquisition modes, sample limiting ----------------------------*/ @@ -1146,11 +1156,9 @@ struct sr_dev_driver { /** Close device */ int (*dev_close) (struct sr_dev_inst *sdi); /** Begin data acquisition on the specified device. */ - int (*dev_acquisition_start) (const struct sr_dev_inst *sdi, - void *cb_data); + int (*dev_acquisition_start) (const struct sr_dev_inst *sdi); /** End data acquisition on the specified device. */ - int (*dev_acquisition_stop) (struct sr_dev_inst *sdi, - void *cb_data); + int (*dev_acquisition_stop) (struct sr_dev_inst *sdi); /* Dynamic */ /** Device driver context, considered private. Initialized by init(). */