Deprecate SR_DI_TRIGGER_TYPES.
This is replaced by SR_CONF_TRIGGER_TYPE.
This commit is contained in:
parent
328bafabd4
commit
c50277a6ec
|
@ -37,7 +37,7 @@
|
||||||
#define USB_VENDOR_NAME "ASIX"
|
#define USB_VENDOR_NAME "ASIX"
|
||||||
#define USB_MODEL_NAME "SIGMA"
|
#define USB_MODEL_NAME "SIGMA"
|
||||||
#define USB_MODEL_VERSION ""
|
#define USB_MODEL_VERSION ""
|
||||||
#define TRIGGER_TYPES "rf10"
|
#define TRIGGER_TYPE "rf10"
|
||||||
#define NUM_PROBES 16
|
#define NUM_PROBES 16
|
||||||
|
|
||||||
SR_PRIV struct sr_dev_driver asix_sigma_driver_info;
|
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:
|
case SR_DI_HWCAPS:
|
||||||
*data = hwcaps;
|
*data = hwcaps;
|
||||||
break;
|
break;
|
||||||
case SR_DI_TRIGGER_TYPES:
|
|
||||||
*data = (char *)TRIGGER_TYPES;
|
|
||||||
break;
|
|
||||||
case SR_CONF_SAMPLERATE:
|
case SR_CONF_SAMPLERATE:
|
||||||
if (sdi) {
|
if (sdi) {
|
||||||
devc = sdi->priv;
|
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:
|
case SR_CONF_SAMPLERATE:
|
||||||
*data = &samplerates;
|
*data = &samplerates;
|
||||||
break;
|
break;
|
||||||
|
case SR_CONF_TRIGGER_TYPE:
|
||||||
|
*data = (char *)TRIGGER_TYPE;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return SR_ERR_ARG;
|
return SR_ERR_ARG;
|
||||||
}
|
}
|
||||||
|
|
|
@ -296,11 +296,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
|
||||||
case SR_DI_HWCAPS:
|
case SR_DI_HWCAPS:
|
||||||
*data = hwcaps;
|
*data = hwcaps;
|
||||||
break;
|
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:
|
case SR_CONF_SAMPLERATE:
|
||||||
if (sdi) {
|
if (sdi) {
|
||||||
devc = sdi->priv;
|
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();
|
fill_supported_samplerates_if_needed();
|
||||||
*data = &samplerates;
|
*data = &samplerates;
|
||||||
break;
|
break;
|
||||||
|
case SR_CONF_TRIGGER_TYPE:
|
||||||
|
*data = (char *)TRIGGER_TYPE;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return SR_ERR_ARG;
|
return SR_ERR_ARG;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
#define USB_MODEL_VERSION ""
|
#define USB_MODEL_VERSION ""
|
||||||
|
|
||||||
#define NUM_PROBES 8
|
#define NUM_PROBES 8
|
||||||
#define TRIGGER_TYPES "01"
|
#define TRIGGER_TYPE "01"
|
||||||
#define SDRAM_SIZE (8 * 1024 * 1024)
|
#define SDRAM_SIZE (8 * 1024 * 1024)
|
||||||
#define MIN_NUM_SAMPLES 1
|
#define MIN_NUM_SAMPLES 1
|
||||||
|
|
||||||
|
|
|
@ -610,9 +610,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
|
||||||
case SR_DI_HWCAPS:
|
case SR_DI_HWCAPS:
|
||||||
*data = hwcaps;
|
*data = hwcaps;
|
||||||
break;
|
break;
|
||||||
case SR_DI_TRIGGER_TYPES:
|
|
||||||
*data = TRIGGER_TYPES;
|
|
||||||
break;
|
|
||||||
case SR_CONF_SAMPLERATE:
|
case SR_CONF_SAMPLERATE:
|
||||||
if (sdi) {
|
if (sdi) {
|
||||||
devc = sdi->priv;
|
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:
|
case SR_CONF_SAMPLERATE:
|
||||||
*data = &samplerates;
|
*data = &samplerates;
|
||||||
break;
|
break;
|
||||||
|
case SR_CONF_TRIGGER_TYPE:
|
||||||
|
*data = TRIGGER_TYPE;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return SR_ERR_ARG;
|
return SR_ERR_ARG;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#define USB_INTERFACE 0
|
#define USB_INTERFACE 0
|
||||||
#define USB_CONFIGURATION 1
|
#define USB_CONFIGURATION 1
|
||||||
#define NUM_TRIGGER_STAGES 4
|
#define NUM_TRIGGER_STAGES 4
|
||||||
#define TRIGGER_TYPES "01"
|
#define TRIGGER_TYPE "01"
|
||||||
|
|
||||||
#define MAX_RENUM_DELAY_MS 3000
|
#define MAX_RENUM_DELAY_MS 3000
|
||||||
#define NUM_SIMUL_TRANSFERS 32
|
#define NUM_SIMUL_TRANSFERS 32
|
||||||
|
|
|
@ -306,9 +306,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
|
||||||
case SR_DI_HWCAPS:
|
case SR_DI_HWCAPS:
|
||||||
*data = hwcaps;
|
*data = hwcaps;
|
||||||
break;
|
break;
|
||||||
case SR_DI_TRIGGER_TYPES:
|
|
||||||
*data = (char *)TRIGGER_TYPES;
|
|
||||||
break;
|
|
||||||
case SR_CONF_SAMPLERATE:
|
case SR_CONF_SAMPLERATE:
|
||||||
if (sdi) {
|
if (sdi) {
|
||||||
devc = sdi->priv;
|
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:
|
case SR_CONF_SAMPLERATE:
|
||||||
*data = &samplerates;
|
*data = &samplerates;
|
||||||
break;
|
break;
|
||||||
|
case SR_CONF_TRIGGER_TYPE:
|
||||||
|
*data = (char *)TRIGGER_TYPE;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return SR_ERR_ARG;
|
return SR_ERR_ARG;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
|
|
||||||
#define NUM_PROBES 8
|
#define NUM_PROBES 8
|
||||||
#define NUM_TRIGGER_STAGES 4
|
#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 SERIALCOMM "460800/8n1/flow=2"
|
||||||
#define SERIALCONN "/dev/ttyUSB0"
|
#define SERIALCONN "/dev/ttyUSB0"
|
||||||
#define CLOCK_RATE SR_MHZ(100)
|
#define CLOCK_RATE SR_MHZ(100)
|
||||||
|
|
|
@ -261,9 +261,6 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi)
|
||||||
case SR_DI_HWCAPS:
|
case SR_DI_HWCAPS:
|
||||||
*data = hwcaps;
|
*data = hwcaps;
|
||||||
break;
|
break;
|
||||||
case SR_DI_TRIGGER_TYPES:
|
|
||||||
*data = (char *)TRIGGER_TYPES;
|
|
||||||
break;
|
|
||||||
case SR_CONF_SAMPLERATE:
|
case SR_CONF_SAMPLERATE:
|
||||||
if (sdi) {
|
if (sdi) {
|
||||||
devc = sdi->priv;
|
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:
|
case SR_CONF_SAMPLERATE:
|
||||||
*data = &samplerates;
|
*data = &samplerates;
|
||||||
break;
|
break;
|
||||||
|
case SR_CONF_TRIGGER_TYPE:
|
||||||
|
*data = (char *)TRIGGER_TYPE;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return SR_ERR_ARG;
|
return SR_ERR_ARG;
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
#define NUM_PROBES 32
|
#define NUM_PROBES 32
|
||||||
#define NUM_TRIGGER_STAGES 4
|
#define NUM_TRIGGER_STAGES 4
|
||||||
#define TRIGGER_TYPES "01"
|
#define TRIGGER_TYPE "01"
|
||||||
#define SERIAL_SPEED B115200
|
#define SERIAL_SPEED B115200
|
||||||
#define CLOCK_RATE SR_MHZ(100)
|
#define CLOCK_RATE SR_MHZ(100)
|
||||||
#define MIN_NUM_SAMPLES 4
|
#define MIN_NUM_SAMPLES 4
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
#define USB_INTERFACE 0
|
#define USB_INTERFACE 0
|
||||||
#define USB_CONFIGURATION 1
|
#define USB_CONFIGURATION 1
|
||||||
#define NUM_TRIGGER_STAGES 4
|
#define NUM_TRIGGER_STAGES 4
|
||||||
#define TRIGGER_TYPES "01"
|
#define TRIGGER_TYPE "01"
|
||||||
|
|
||||||
#define PACKET_SIZE 2048 /* ?? */
|
#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:
|
case SR_DI_HWCAPS:
|
||||||
*data = hwcaps;
|
*data = hwcaps;
|
||||||
break;
|
break;
|
||||||
case SR_DI_TRIGGER_TYPES:
|
|
||||||
*data = TRIGGER_TYPES;
|
|
||||||
sr_spew("zp: %s: Returning triggertypes: %s.", __func__, TRIGGER_TYPES);
|
|
||||||
break;
|
|
||||||
case SR_CONF_SAMPLERATE:
|
case SR_CONF_SAMPLERATE:
|
||||||
if (sdi) {
|
if (sdi) {
|
||||||
devc = sdi->priv;
|
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:
|
case SR_CONF_SAMPLERATE:
|
||||||
*data = &samplerates;
|
*data = &samplerates;
|
||||||
break;
|
break;
|
||||||
|
case SR_CONF_TRIGGER_TYPE:
|
||||||
|
*data = TRIGGER_TYPE;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return SR_ERR_ARG;
|
return SR_ERR_ARG;
|
||||||
}
|
}
|
||||||
|
|
|
@ -461,6 +461,9 @@ enum {
|
||||||
/** Coupling. */
|
/** Coupling. */
|
||||||
SR_CONF_COUPLING,
|
SR_CONF_COUPLING,
|
||||||
|
|
||||||
|
/** Trigger types. */
|
||||||
|
SR_CONF_TRIGGER_TYPE,
|
||||||
|
|
||||||
/*--- Special stuff -------------------------------------------------*/
|
/*--- Special stuff -------------------------------------------------*/
|
||||||
|
|
||||||
/** Session filename. */
|
/** Session filename. */
|
||||||
|
@ -551,8 +554,6 @@ enum {
|
||||||
SR_DI_HWOPTS = 10000,
|
SR_DI_HWOPTS = 10000,
|
||||||
/** A list of capabilities supported by the device. */
|
/** A list of capabilities supported by the device. */
|
||||||
SR_DI_HWCAPS,
|
SR_DI_HWCAPS,
|
||||||
/** Types of logic trigger supported, out of "01crf" (char *). */
|
|
||||||
SR_DI_TRIGGER_TYPES,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -230,7 +230,7 @@ SR_API char **sr_parse_triggerstring(const struct sr_dev_inst *sdi,
|
||||||
return NULL;
|
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) {
|
(const void **)&trigger_types, sdi) != SR_OK) {
|
||||||
sr_err("%s: Device doesn't support any triggers.", __func__);
|
sr_err("%s: Device doesn't support any triggers.", __func__);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue