]> sigrok.org Git - libsigrok.git/blobdiff - hardware/hantek-dso/api.c
hantek-dso: Update to constified libsigrok API.
[libsigrok.git] / hardware / hantek-dso / api.c
index 4ab64ef68640925596cc3a50eab89ab49be5b1e1..211d782e6c47d2687e2bb01551a8552e82b6d6bb 100644 (file)
@@ -35,6 +35,8 @@
 #include "config.h"
 #include "dso.h"
 
+/* FIXME: Temporary build fix, this will be removed later. */
+#define GTV_TO_MSEC(gtv)       (gtv.tv_sec * 1000 + gtv.tv_usec / 1000)
 
 /* Max time in ms before we want to check on events */
 #define TICK    1
@@ -355,7 +357,7 @@ static int hw_cleanup(void)
        return SR_OK;
 }
 
-static void *hw_get_device_info(int dev_index, int dev_info_id)
+static const void *hw_get_device_info(int dev_index, int dev_info_id)
 {
        struct sr_dev_inst *sdi;
        struct context *ctx;
@@ -414,13 +416,12 @@ static int hw_get_status(int device_index)
        return sdi->status;
 }
 
-static int *hwcap_get_all(void)
+static const int *hwcap_get_all(void)
 {
-
        return capabilities;
 }
 
-static int hw_dev_config_set(int dev_index, int hwcap, void *value)
+static int hw_dev_config_set(int dev_index, int hwcap, const void *value)
 {
        struct sr_dev_inst *sdi;
        struct context *ctx;