sr: add new driver API call info_get()

This will replace dev_info_get(), and will be used to fetch both
driver and device instance-specific information. The sr_dev_inst
argument is NULL in case of a driver info fetch. In line with the
libsigrok wrapper, this function returns an error code, using the
supplied void ** to return the requested data.
This commit is contained in:
Bert Vermeulen 2012-07-12 21:34:30 +02:00
parent 9e41fdba40
commit f92f4eab23
1 changed files with 3 additions and 0 deletions

View File

@ -487,7 +487,10 @@ struct sr_dev_driver {
/* Device-specific */
int (*dev_open) (int dev_index);
int (*dev_close) (int dev_index);
/* TODO remove this */
const void *(*dev_info_get) (int dev_index, int dev_info_id);
int (*info_get) (int dev_info_id, const void **data,
const struct sr_dev_inst *sdi);
int (*dev_status_get) (int dev_index);
const int *(*hwcap_get_all) (void);
int (*dev_config_set) (int dev_index, int hwcap, const void *value);