fx2lafw: Basic implementation of hw_dev_config_set with SR_HWCAP_LIMIT_SAMPLES
This commit is contained in:
parent
62bc70e412
commit
7cb621d418
|
@ -463,12 +463,24 @@ static int *hw_hwcap_get_all(void)
|
||||||
return fx2lafw_capabilities;
|
return fx2lafw_capabilities;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int hw_dev_config_set(int dev_index, int capability, void *value)
|
static int hw_dev_config_set(int dev_index, int hwcap, void *value)
|
||||||
{
|
{
|
||||||
(void)dev_index;
|
struct sr_dev_inst *sdi;
|
||||||
(void)capability;
|
struct fx2lafw_device *ctx;
|
||||||
(void)value;
|
int ret;
|
||||||
return SR_OK;
|
|
||||||
|
if (!(sdi = sr_dev_inst_get(dev_insts, dev_index)))
|
||||||
|
return SR_ERR;
|
||||||
|
ctx = sdi->priv;
|
||||||
|
|
||||||
|
if (hwcap == SR_HWCAP_LIMIT_SAMPLES) {
|
||||||
|
ctx->limit_samples = *(uint64_t *)value;
|
||||||
|
ret = SR_OK;
|
||||||
|
} else {
|
||||||
|
ret = SR_ERR;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int hw_dev_acquisition_start(int dev_index, gpointer session_data)
|
static int hw_dev_acquisition_start(int dev_index, gpointer session_data)
|
||||||
|
|
|
@ -52,6 +52,9 @@ struct fx2lafw_device {
|
||||||
*/
|
*/
|
||||||
GTimeVal fw_updated;
|
GTimeVal fw_updated;
|
||||||
|
|
||||||
|
/* Device/Capture Settings */
|
||||||
|
uint64_t limit_samples;
|
||||||
|
|
||||||
void *session_data;
|
void *session_data;
|
||||||
|
|
||||||
struct sr_usb_dev_inst *usb;
|
struct sr_usb_dev_inst *usb;
|
||||||
|
|
Loading…
Reference in New Issue