]> sigrok.org Git - libsigrok.git/blobdiff - sigrok.h
sr: Some more s/device_instance/dev_inst/.
[libsigrok.git] / sigrok.h
index e12c5bc5acc6b4479f88cdb07e42f26c17b05b63..e8e770f6d87b089238c7bbc71d01bf70e10abd05 100644 (file)
--- a/sigrok.h
+++ b/sigrok.h
@@ -66,12 +66,12 @@ extern "C" {
 #define SR_HZ_TO_NS(n) (1000000000 / (n))
 
 /* libsigrok loglevels. */
-#define SR_LOG_NONE               0 /**< Output no messages at all. */
+#define SR_LOG_NONE           0 /**< Output no messages at all. */
 #define SR_LOG_ERR            1 /**< Output error messages. */
-#define SR_LOG_WARN               2 /**< Output warnings. */
-#define SR_LOG_INFO               3 /**< Output informational messages. */
+#define SR_LOG_WARN           2 /**< Output warnings. */
+#define SR_LOG_INFO           3 /**< Output informational messages. */
 #define SR_LOG_DBG            4 /**< Output debug messages. */
-#define SR_LOG_SPEW               5 /**< Output very noisy debug messages. */
+#define SR_LOG_SPEW           5 /**< Output very noisy debug messages. */
 
 /*
  * Use SR_API to mark public API symbols, and SR_PRIV for private symbols.
@@ -276,7 +276,7 @@ struct sr_hwcap_option {
        char *shortname;
 };
 
-struct sr_device_instance {
+struct sr_dev_inst {
        int index;
        int status;
        int instance_type;
@@ -286,7 +286,7 @@ struct sr_device_instance {
        void *priv;
 };
 
-/* sr_device_instance types */
+/* sr_dev_inst types */
 enum {
        SR_USB_INSTANCE,
        SR_SERIAL_INSTANCE,
@@ -310,7 +310,7 @@ enum {
 
 /* Device info IDs */
 enum {
-       /* struct sr_device_instance for this specific device */
+       /* struct sr_dev_inst for this specific device */
        SR_DI_INSTANCE,
        /* The number of probes connected to this device */
        SR_DI_NUM_PROBES,
@@ -344,7 +344,7 @@ struct sr_device_plugin {
        char *longname;
        int api_version;
        int (*init) (const char *deviceinfo);
-       void (*cleanup) (void);
+       int (*cleanup) (void);
 
        /* Device-specific */
        int (*opendev) (int device_index);
@@ -354,7 +354,7 @@ struct sr_device_plugin {
        int *(*get_capabilities) (void);
        int (*set_configuration) (int device_index, int capability, void *value);
        int (*start_acquisition) (int device_index, gpointer session_device_id);
-       void (*stop_acquisition) (int device_index, gpointer session_device_id);
+       int (*stop_acquisition) (int device_index, gpointer session_device_id);
 };
 
 struct sr_session {