From: Bert Vermeulen Date: Thu, 12 Jul 2012 19:34:30 +0000 (+0200) Subject: sr: add new driver API call info_get() X-Git-Tag: dsupstream~833 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f92f4eab23165aefa271d87cc0e60cbb8e24d154;p=libsigrok.git 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. --- diff --git a/libsigrok.h b/libsigrok.h index 76b54b36..a3cb4ce4 100644 --- a/libsigrok.h +++ b/libsigrok.h @@ -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);