#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 */
"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",
"Number of logic channels", NULL},
{SR_CONF_NUM_ANALOG_CHANNELS, SR_T_INT32, "analog_channels",
"Number of analog channels", NULL},
- {SR_CONF_OUTPUT_VOLTAGE, SR_T_FLOAT, "output_voltage",
- "Current output voltage", NULL},
- {SR_CONF_OUTPUT_VOLTAGE_TARGET, SR_T_FLOAT, "output_voltage_target",
- "Output voltage target", NULL},
- {SR_CONF_OUTPUT_CURRENT, SR_T_FLOAT, "output_current",
- "Current output current", NULL},
- {SR_CONF_OUTPUT_CURRENT_LIMIT, SR_T_FLOAT, "output_current_limit",
- "Output current limit", NULL},
- {SR_CONF_OUTPUT_ENABLED, SR_T_BOOL, "output_enabled",
- "Output enabled", NULL},
- {SR_CONF_OUTPUT_CHANNEL_CONFIG, SR_T_STRING, "output_channel_config",
- "Output channel modes", NULL},
+ {SR_CONF_VOLTAGE, SR_T_FLOAT, "voltage",
+ "Current voltage", NULL},
+ {SR_CONF_VOLTAGE_TARGET, SR_T_FLOAT, "voltage_target",
+ "Voltage target", NULL},
+ {SR_CONF_CURRENT, SR_T_FLOAT, "current",
+ "Current current", NULL},
+ {SR_CONF_CURRENT_LIMIT, SR_T_FLOAT, "current_limit",
+ "Current limit", NULL},
+ {SR_CONF_ENABLED, SR_T_BOOL, "enabled",
+ "Channel enabled", NULL},
+ {SR_CONF_CHANNEL_CONFIG, SR_T_STRING, "channel_config",
+ "Channel modes", NULL},
{SR_CONF_OVER_VOLTAGE_PROTECTION_ENABLED, SR_T_BOOL, "ovp_enabled",
"Over-voltage protection enabled", NULL},
{SR_CONF_OVER_VOLTAGE_PROTECTION_ACTIVE, SR_T_BOOL, "ovp_active",
"Clock edge", NULL},
{SR_CONF_AMPLITUDE, SR_T_FLOAT, "amplitude",
"Amplitude", NULL},
- {SR_CONF_OUTPUT_REGULATION, SR_T_STRING, "output_regulation",
- "Output channel regulation", NULL},
+ {SR_CONF_REGULATION, SR_T_STRING, "regulation",
+ "Channel regulation", NULL},
{SR_CONF_OVER_TEMPERATURE_PROTECTION, SR_T_BOOL, "otp",
"Over-temperature protection", NULL},
- {SR_CONF_OUTPUT_FREQUENCY, SR_T_UINT64, "output_frequency",
+ {SR_CONF_OUTPUT_FREQUENCY, SR_T_FLOAT, "output_frequency",
"Output frequency", NULL},
+ {SR_CONF_OUTPUT_FREQUENCY_TARGET, SR_T_FLOAT, "output_frequency_target",
+ "Output frequency target", NULL},
{SR_CONF_MEASURED_QUANTITY, SR_T_STRING, "measured_quantity",
"Measured quantity", NULL},
{SR_CONF_MEASURED_2ND_QUANTITY, SR_T_STRING, "measured_2nd_quantity",
"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",
return NULL;
}
- if (!driver->priv) {
+ if (!driver->context) {
sr_err("Driver not initialized, can't scan for devices.");
return NULL;
}
for (i = 0; drivers[i]; i++) {
if (drivers[i]->cleanup)
drivers[i]->cleanup(drivers[i]);
- drivers[i]->priv = NULL;
+ drivers[i]->context = NULL;
}
}