fx2lafw: Basic implementation of hw_dev_config_set with SR_HWCAP_LIMIT_SAMPLES

This commit is contained in:
Joel Holdsworth 2012-02-27 19:21:08 +00:00
parent 62bc70e412
commit 7cb621d418
2 changed files with 20 additions and 5 deletions

View File

@ -463,12 +463,24 @@ static int *hw_hwcap_get_all(void)
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;
(void)capability;
(void)value;
return SR_OK;
struct sr_dev_inst *sdi;
struct fx2lafw_device *ctx;
int ret;
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)

View File

@ -52,6 +52,9 @@ struct fx2lafw_device {
*/
GTimeVal fw_updated;
/* Device/Capture Settings */
uint64_t limit_samples;
void *session_data;
struct sr_usb_dev_inst *usb;