]> sigrok.org Git - libsigrok.git/blobdiff - sigrok.h
sr: cleanup callback: Return int.
[libsigrok.git] / sigrok.h
index 5e42011cc81dd3c7368e7604d4acab8e9c7a6714..e08b2aed6a1018f8947383895853daa53f9419e5 100644 (file)
--- a/sigrok.h
+++ b/sigrok.h
@@ -1,7 +1,7 @@
 /*
  * This file is part of the sigrok project.
  *
- * Copyright (C) 2012 Bert Vermeulen <bert@biot.com>
+ * Copyright (C) 2010-2012 Bert Vermeulen <bert@biot.com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -54,8 +54,8 @@ extern "C" {
 #define SR_ERR_BUG           -4 /* Errors hinting at internal bugs */
 #define SR_ERR_SAMPLERATE    -5 /* Incorrect samplerate */
 
-#define SR_MAX_NUM_PROBES      64 /* Limited by uint64_t. */
-#define SR_MAX_PROBENAME_LEN   32
+#define SR_MAX_NUM_PROBES    64 /* Limited by uint64_t. */
+#define SR_MAX_PROBENAME_LEN 32
 
 /* Handy little macros */
 #define SR_HZ(n)  (n)
@@ -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_ERR     1 /**< Output error 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_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_DBG            4 /**< Output 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.
@@ -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 {