From: Bert Vermeulen Date: Fri, 25 Jan 2013 14:09:20 +0000 (+0100) Subject: Deprecate SR_DI_HWOPTS. X-Git-Tag: dsupstream~308 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=0d485e30c607b22b5f328512327e4e0fafc6cbb7;p=libsigrok.git Deprecate SR_DI_HWOPTS. This is replaced by SR_CONF_SCAN_OPTIONS. --- diff --git a/hardware/agilent-dmm/api.c b/hardware/agilent-dmm/api.c index 5f961018..227cbfcf 100644 --- a/hardware/agilent-dmm/api.c +++ b/hardware/agilent-dmm/api.c @@ -252,9 +252,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi) (void)sdi; switch (id) { - case SR_DI_HWOPTS: - *data = hwopts; - break; default: return SR_ERR_ARG; } @@ -305,6 +302,9 @@ static int config_list(int key, const void **data, const struct sr_dev_inst *sdi (void)sdi; switch (key) { + case SR_CONF_SCAN_OPTIONS: + *data = hwopts; + break; case SR_CONF_DEVICE_OPTIONS: *data = hwcaps; break; diff --git a/hardware/colead-slm/api.c b/hardware/colead-slm/api.c index 8fed762a..819e1397 100644 --- a/hardware/colead-slm/api.c +++ b/hardware/colead-slm/api.c @@ -196,9 +196,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi) (void)sdi; switch (id) { - case SR_DI_HWOPTS: - *data = hwopts; - break; default: return SR_ERR_ARG; } @@ -249,6 +246,9 @@ static int config_list(int key, const void **data, const struct sr_dev_inst *sdi (void)sdi; switch (key) { + case SR_CONF_SCAN_OPTIONS: + *data = hwopts; + break; case SR_CONF_DEVICE_OPTIONS: *data = hwcaps; break; diff --git a/hardware/fluke-dmm/api.c b/hardware/fluke-dmm/api.c index dd9e7178..8980f25e 100644 --- a/hardware/fluke-dmm/api.c +++ b/hardware/fluke-dmm/api.c @@ -286,9 +286,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi) (void)sdi; switch (id) { - case SR_DI_HWOPTS: - *data = hwopts; - break; default: return SR_ERR_ARG; } @@ -339,6 +336,9 @@ static int config_list(int key, const void **data, const struct sr_dev_inst *sdi (void)sdi; switch (key) { + case SR_CONF_SCAN_OPTIONS: + *data = hwopts; + break; case SR_CONF_DEVICE_OPTIONS: *data = hwcaps; break; diff --git a/hardware/lascar-el-usb/api.c b/hardware/lascar-el-usb/api.c index c9ccbfda..8ebb4ca0 100644 --- a/hardware/lascar-el-usb/api.c +++ b/hardware/lascar-el-usb/api.c @@ -218,9 +218,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi) (void)sdi; switch (id) { - case SR_DI_HWOPTS: - *data = hwopts; - break; default: return SR_ERR_ARG; } @@ -264,6 +261,9 @@ static int config_list(int key, const void **data, const struct sr_dev_inst *sdi (void)sdi; switch (key) { + case SR_CONF_SCAN_OPTIONS: + *data = hwopts; + break; case SR_CONF_DEVICE_OPTIONS: *data = hwcaps; break; diff --git a/hardware/openbench-logic-sniffer/api.c b/hardware/openbench-logic-sniffer/api.c index 634a2a57..52b9d975 100644 --- a/hardware/openbench-logic-sniffer/api.c +++ b/hardware/openbench-logic-sniffer/api.c @@ -255,9 +255,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi) struct dev_context *devc; switch (id) { - case SR_DI_HWOPTS: - *data = hwopts; - break; case SR_CONF_SAMPLERATE: if (sdi) { devc = sdi->priv; @@ -326,6 +323,9 @@ static int config_list(int key, const void **data, const struct sr_dev_inst *sdi (void)sdi; switch (key) { + case SR_CONF_SCAN_OPTIONS: + *data = hwopts; + break; case SR_CONF_DEVICE_OPTIONS: *data = hwcaps; break; diff --git a/hardware/serial-dmm/api.c b/hardware/serial-dmm/api.c index 7ca807c4..69dd3a3e 100644 --- a/hardware/serial-dmm/api.c +++ b/hardware/serial-dmm/api.c @@ -378,9 +378,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi) (void)sdi; switch (id) { - case SR_DI_HWOPTS: - *data = hwopts; - break; default: return SR_ERR_ARG; } @@ -426,6 +423,9 @@ static int config_list(int key, const void **data, const struct sr_dev_inst *sdi (void)sdi; switch (key) { + case SR_CONF_SCAN_OPTIONS: + *data = hwopts; + break; case SR_CONF_DEVICE_OPTIONS: *data = hwcaps; break; diff --git a/hardware/tondaj-sl-814/api.c b/hardware/tondaj-sl-814/api.c index 7f606631..47c2e67f 100644 --- a/hardware/tondaj-sl-814/api.c +++ b/hardware/tondaj-sl-814/api.c @@ -200,9 +200,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi) (void)sdi; switch (id) { - case SR_DI_HWOPTS: - *data = hwopts; - break; default: return SR_ERR_ARG; } @@ -241,6 +238,9 @@ static int config_list(int key, const void **data, const struct sr_dev_inst *sdi (void)sdi; switch (key) { + case SR_CONF_SCAN_OPTIONS: + *data = hwopts; + break; case SR_CONF_DEVICE_OPTIONS: *data = hwcaps; break; diff --git a/hardware/uni-t-dmm/api.c b/hardware/uni-t-dmm/api.c index 75112838..7ac43333 100644 --- a/hardware/uni-t-dmm/api.c +++ b/hardware/uni-t-dmm/api.c @@ -193,9 +193,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi) sr_spew("Backend requested info_id %d.", id); switch (id) { - case SR_DI_HWOPTS: - *data = hwopts; - break; case SR_CONF_SAMPLERATE: /* TODO: Get rid of this. */ *data = NULL; @@ -251,6 +248,9 @@ static int config_list(int key, const void **data, const struct sr_dev_inst *sdi (void)sdi; switch (key) { + case SR_CONF_SCAN_OPTIONS: + *data = hwopts; + break; case SR_CONF_DEVICE_OPTIONS: *data = hwcaps; break; diff --git a/libsigrok.h b/libsigrok.h index 2b17a5f6..cfa6613e 100644 --- a/libsigrok.h +++ b/libsigrok.h @@ -549,17 +549,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 device supports either a range of samplerates with steps of a given * granularity, or is limited to a set of defined samplerates. Use either