]> sigrok.org Git - libsigrok.git/blobdiff - src/hwdriver.c
Build: Set local include directories in Makefile.am
[libsigrok.git] / src / hwdriver.c
index 04bb5de66e982e6499f585204f708197536c6886..3348b759562593746bce2792b8a282e49241e5ae 100644 (file)
@@ -24,7 +24,7 @@
 #include <string.h>
 #include <glib.h>
 #include "config.h" /* Needed for HAVE_LIBUSB_1_0 and others. */
-#include "libsigrok.h"
+#include <libsigrok/libsigrok.h>
 #include "libsigrok-internal.h"
 
 /** @cond PRIVATE */
@@ -65,6 +65,8 @@ static struct sr_config_info sr_config_info_data[] = {
                "Connection", NULL},
        {SR_CONF_SERIALCOMM, SR_T_STRING, "serialcomm",
                "Serial communication", NULL},
+       {SR_CONF_MODBUSADDR, SR_T_UINT64, "modbusaddr",
+               "Modbus slave address", NULL},
 
        /* Device (or channel group) configuration */
        {SR_CONF_SAMPLERATE, SR_T_UINT64, "samplerate",
@@ -167,6 +169,8 @@ static struct sr_config_info sr_config_info_data[] = {
                "Measured secondary quantity", NULL},
        {SR_CONF_EQUIV_CIRCUIT_MODEL, SR_T_STRING, "equiv_circuit_model",
                "Equivalent circuit model", NULL},
+       {SR_CONF_OVER_TEMPERATURE_PROTECTION_ACTIVE, SR_T_BOOL, "otp_active",
+               "Over-temperature protection active", NULL},
 
        /* Special stuff */
        {SR_CONF_SCAN_OPTIONS, SR_T_STRING, "scan_options",
@@ -393,7 +397,7 @@ SR_API GSList *sr_driver_scan(struct sr_dev_driver *driver, GSList *options)
                return NULL;
        }
 
-       if (!driver->priv) {
+       if (!driver->context) {
                sr_err("Driver not initialized, can't scan for devices.");
                return NULL;
        }
@@ -430,7 +434,7 @@ SR_PRIV void sr_hw_cleanup_all(const struct sr_context *ctx)
        for (i = 0; drivers[i]; i++) {
                if (drivers[i]->cleanup)
                        drivers[i]->cleanup(drivers[i]);
-               drivers[i]->priv = NULL;
+               drivers[i]->context = NULL;
        }
 }