Deprecate SR_DI_TRIGGER_TYPES.

This is replaced by SR_CONF_TRIGGER_TYPE.
This commit is contained in:
Bert Vermeulen 2013-01-25 11:52:27 +01:00
parent 328bafabd4
commit c50277a6ec
12 changed files with 28 additions and 30 deletions

View File

@ -37,7 +37,7 @@
#define USB_VENDOR_NAME "ASIX"
#define USB_MODEL_NAME "SIGMA"
#define USB_MODEL_VERSION ""
#define TRIGGER_TYPES "rf10"
#define TRIGGER_TYPE "rf10"
#define NUM_PROBES 16
SR_PRIV struct sr_dev_driver asix_sigma_driver_info;
@ -795,9 +795,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
case SR_DI_HWCAPS:
*data = hwcaps;
break;
case SR_DI_TRIGGER_TYPES:
*data = (char *)TRIGGER_TYPES;
break;
case SR_CONF_SAMPLERATE:
if (sdi) {
devc = sdi->priv;
@ -849,6 +846,9 @@ static int config_list(int key, const void **data, const struct sr_dev_inst *sdi
case SR_CONF_SAMPLERATE:
*data = &samplerates;
break;
case SR_CONF_TRIGGER_TYPE:
*data = (char *)TRIGGER_TYPE;
break;
default:
return SR_ERR_ARG;
}

View File

@ -296,11 +296,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
case SR_DI_HWCAPS:
*data = hwcaps;
break;
case SR_DI_TRIGGER_TYPES:
*data = (char *)TRIGGER_TYPES;
sr_spew("%s: Returning trigger types: %s.", __func__,
TRIGGER_TYPES);
break;
case SR_CONF_SAMPLERATE:
if (sdi) {
devc = sdi->priv;
@ -370,6 +365,9 @@ static int config_list(int key, const void **data, const struct sr_dev_inst *sdi
fill_supported_samplerates_if_needed();
*data = &samplerates;
break;
case SR_CONF_TRIGGER_TYPE:
*data = (char *)TRIGGER_TYPE;
break;
default:
return SR_ERR_ARG;
}

View File

@ -43,7 +43,7 @@
#define USB_MODEL_VERSION ""
#define NUM_PROBES 8
#define TRIGGER_TYPES "01"
#define TRIGGER_TYPE "01"
#define SDRAM_SIZE (8 * 1024 * 1024)
#define MIN_NUM_SAMPLES 1

View File

@ -610,9 +610,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
case SR_DI_HWCAPS:
*data = hwcaps;
break;
case SR_DI_TRIGGER_TYPES:
*data = TRIGGER_TYPES;
break;
case SR_CONF_SAMPLERATE:
if (sdi) {
devc = sdi->priv;
@ -656,6 +653,9 @@ static int config_list(int key, const void **data, const struct sr_dev_inst *sdi
case SR_CONF_SAMPLERATE:
*data = &samplerates;
break;
case SR_CONF_TRIGGER_TYPE:
*data = TRIGGER_TYPE;
break;
default:
return SR_ERR_ARG;
}

View File

@ -35,7 +35,7 @@
#define USB_INTERFACE 0
#define USB_CONFIGURATION 1
#define NUM_TRIGGER_STAGES 4
#define TRIGGER_TYPES "01"
#define TRIGGER_TYPE "01"
#define MAX_RENUM_DELAY_MS 3000
#define NUM_SIMUL_TRANSFERS 32

View File

@ -306,9 +306,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
case SR_DI_HWCAPS:
*data = hwcaps;
break;
case SR_DI_TRIGGER_TYPES:
*data = (char *)TRIGGER_TYPES;
break;
case SR_CONF_SAMPLERATE:
if (sdi) {
devc = sdi->priv;
@ -398,6 +395,9 @@ static int config_list(int key, const void **data, const struct sr_dev_inst *sdi
case SR_CONF_SAMPLERATE:
*data = &samplerates;
break;
case SR_CONF_TRIGGER_TYPE:
*data = (char *)TRIGGER_TYPE;
break;
default:
return SR_ERR_ARG;
}

View File

@ -43,7 +43,7 @@
#define NUM_PROBES 8
#define NUM_TRIGGER_STAGES 4
#define TRIGGER_TYPES "01" //the first r/f is used for the whole group
#define TRIGGER_TYPE "01" //the first r/f is used for the whole group
#define SERIALCOMM "460800/8n1/flow=2"
#define SERIALCONN "/dev/ttyUSB0"
#define CLOCK_RATE SR_MHZ(100)

View File

@ -261,9 +261,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
case SR_DI_HWCAPS:
*data = hwcaps;
break;
case SR_DI_TRIGGER_TYPES:
*data = (char *)TRIGGER_TYPES;
break;
case SR_CONF_SAMPLERATE:
if (sdi) {
devc = sdi->priv;
@ -335,6 +332,9 @@ static int config_list(int key, const void **data, const struct sr_dev_inst *sdi
case SR_CONF_SAMPLERATE:
*data = &samplerates;
break;
case SR_CONF_TRIGGER_TYPE:
*data = (char *)TRIGGER_TYPE;
break;
default:
return SR_ERR_ARG;
}

View File

@ -37,7 +37,7 @@
#define NUM_PROBES 32
#define NUM_TRIGGER_STAGES 4
#define TRIGGER_TYPES "01"
#define TRIGGER_TYPE "01"
#define SERIAL_SPEED B115200
#define CLOCK_RATE SR_MHZ(100)
#define MIN_NUM_SAMPLES 4

View File

@ -38,7 +38,7 @@
#define USB_INTERFACE 0
#define USB_CONFIGURATION 1
#define NUM_TRIGGER_STAGES 4
#define TRIGGER_TYPES "01"
#define TRIGGER_TYPE "01"
#define PACKET_SIZE 2048 /* ?? */
@ -537,10 +537,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
case SR_DI_HWCAPS:
*data = hwcaps;
break;
case SR_DI_TRIGGER_TYPES:
*data = TRIGGER_TYPES;
sr_spew("zp: %s: Returning triggertypes: %s.", __func__, TRIGGER_TYPES);
break;
case SR_CONF_SAMPLERATE:
if (sdi) {
devc = sdi->priv;
@ -654,6 +650,9 @@ static int config_list(int key, const void **data, const struct sr_dev_inst *sdi
case SR_CONF_SAMPLERATE:
*data = &samplerates;
break;
case SR_CONF_TRIGGER_TYPE:
*data = TRIGGER_TYPE;
break;
default:
return SR_ERR_ARG;
}

View File

@ -461,6 +461,9 @@ enum {
/** Coupling. */
SR_CONF_COUPLING,
/** Trigger types. */
SR_CONF_TRIGGER_TYPE,
/*--- Special stuff -------------------------------------------------*/
/** Session filename. */
@ -551,8 +554,6 @@ enum {
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,
};
/*

View File

@ -230,7 +230,7 @@ SR_API char **sr_parse_triggerstring(const struct sr_dev_inst *sdi,
return NULL;
}
if (sdi->driver->config_get(SR_DI_TRIGGER_TYPES,
if (sdi->driver->config_list(SR_CONF_TRIGGER_TYPE,
(const void **)&trigger_types, sdi) != SR_OK) {
sr_err("%s: Device doesn't support any triggers.", __func__);
return NULL;