X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fhwdriver.c;h=3348b759562593746bce2792b8a282e49241e5ae;hp=04bb5de66e982e6499f585204f708197536c6886;hb=c1aae90038456a61d0f9313d34e6107c3440d3e7;hpb=7a0b98b544ca00f351295f21f895442680b1c014 diff --git a/src/hwdriver.c b/src/hwdriver.c index 04bb5de6..3348b759 100644 --- a/src/hwdriver.c +++ b/src/hwdriver.c @@ -24,7 +24,7 @@ #include #include #include "config.h" /* Needed for HAVE_LIBUSB_1_0 and others. */ -#include "libsigrok.h" +#include #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; } }