X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=proto.h;h=54cccb1712c2e6d490c6f441d41bad4ae0bc03a0;hb=c77ed446f2c08e2906883023c85feafa19a0ec10;hp=a58320b58616f9effc0afa58da13aa1469d1f812;hpb=18bc270461d656460db8a167c10d390fe665f3b9;p=libsigrok.git diff --git a/proto.h b/proto.h index a58320b5..54cccb17 100644 --- a/proto.h +++ b/proto.h @@ -51,9 +51,7 @@ SR_API int sr_dev_probe_enable(const struct sr_dev_inst *sdi, int probenum, gboolean state); SR_API int sr_dev_trigger_set(const struct sr_dev_inst *sdi, int probenum, const char *trigger); -SR_API gboolean sr_dev_has_hwcap(const struct sr_dev_inst *sdi, int hwcap); -SR_API int sr_dev_config_set(const struct sr_dev_inst *sdi, int hwcap, - const void *value); +SR_API gboolean sr_dev_has_option(const struct sr_dev_inst *sdi, int key); SR_API GSList *sr_dev_inst_list(const struct sr_dev_driver *driver); SR_API int sr_dev_inst_clear(const struct sr_dev_driver *driver); @@ -70,13 +68,14 @@ SR_API struct sr_dev_driver **sr_driver_list(void); SR_API int sr_driver_init(struct sr_context *ctx, struct sr_dev_driver *driver); SR_API GSList *sr_driver_scan(struct sr_dev_driver *driver, GSList *options); -SR_API int sr_info_get(struct sr_dev_driver *driver, int id, +SR_API int sr_config_get(const struct sr_dev_driver *driver, int key, + const void **data, const struct sr_dev_inst *sdi); +SR_API int sr_config_set(const struct sr_dev_inst *sdi, int key, + const void *value); +SR_API int sr_config_list(const struct sr_dev_driver *driver, int key, const void **data, const struct sr_dev_inst *sdi); -SR_API gboolean sr_driver_hwcap_exists(struct sr_dev_driver *driver, int hwcap); -SR_API const struct sr_hwcap_option *sr_drvopt_get(int opt); -SR_API const struct sr_hwcap_option *sr_drvopt_name_get(const char *optname); -SR_API const struct sr_hwcap_option *sr_devopt_get(int opt); -SR_API const struct sr_hwcap_option *sr_devopt_name_get(const char *optname); +SR_API const struct sr_config_info *sr_config_info_get(int key); +SR_API const struct sr_config_info *sr_config_info_name_get(const char *optname); /*--- session.c -------------------------------------------------------------*/ @@ -97,7 +96,6 @@ SR_API int sr_session_datafeed_callback_add(sr_datafeed_callback_t cb); /* Session control */ SR_API int sr_session_start(void); SR_API int sr_session_run(void); -SR_API int sr_session_halt(void); SR_API int sr_session_stop(void); SR_API int sr_session_save(const char *filename, const struct sr_dev_inst *sdi, unsigned char *buf, int unitsize, int units);