}
#endif
-
#ifdef HAVE_LIBUSB_1_0
if ((!sdi->connection_id) && (sdi->inst_type == SR_INST_USB)) {
/* connection_id isn't populated, let's do that here. */
}
}
-
return SR_OK;
}
return i & 0x7;
}
-
/*
* Return the timestamp of "DRAM cluster".
*/
},
};
-
SR_PRIV struct sr_dev_driver atten_pps3203_driver_info;
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
#include "protocol.h"
#define SERIALCOMM "9600/8n1"
+
/* 23ms is the longest interval between tokens. */
#define MAX_SCAN_TIME 25 * 1000
"Live",
"Memory",
};
-SR_PRIV struct sr_dev_driver cem_dt_885x_driver_info;
+SR_PRIV struct sr_dev_driver cem_dt_885x_driver_info;
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
return TRUE;
}
-
static int wait_for_token(const struct sr_dev_inst *sdi, int8_t *tokens, int timeout)
{
struct dev_context *devc;
static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data);
-
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
return std_init(sr_ctx, di, LOG_PREFIX);
/* Don't have valid metadata yet. */
return;
-
if (devc->mq == SR_MQ_RESISTANCE && isnan(fvalue))
fvalue = INFINITY;
else if (devc->mq == SR_MQ_CONTINUITY) {
SR_CONF_POWER_OFF | SR_CONF_GET | SR_CONF_SET,
};
-
/* TODO:
* - For the 29S SR_CONF_ENERGYMETER, too.
* - SR_CONF_PATTERN_MODE for some 2x devices
devc->scale *= -1.0;
}
-
/**
* Decode special chars (Metrahit 2x).
*
}
}
-
/** @copydoc sr_dev_driver.config_set
*/
SR_PRIV int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
SR_PRIV struct sr_dev_driver kecheng_kc_330b_driver_info;
-
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
return std_init(sr_ctx, di, LOG_PREFIX);
/* Can get called on an unused driver, doesn't matter. */
return SR_OK;
-
ret = std_dev_clear(di, NULL);
g_free(drvc);
/* Can get called on an unused driver, doesn't matter. */
return SR_OK;
-
ret = std_dev_clear(di, NULL);
g_free(drvc);
libusb_control_transfer(usb->devhdl, LIBUSB_REQUEST_TYPE_VENDOR,
0x02, 0x0001, 0x00, NULL, 0, 50);
-
/* Flush input. The F321 requires this. */
while (libusb_bulk_transfer(usb->devhdl, LASCAR_EP_IN, resp,
256, &ret, 5) == 0 && ret > 0)
{ 0, NULL, 0 }
};
-
static libusb_device_handle *lascar_open(struct libusb_device *dev)
{
libusb_device_handle *dev_hdl;
goto exit_err;
}
-
g_strstrip(buf);
verstr = buf + 4;
}
devc->buflen = 0;
}
-
SR_PRIV int motech_lps_30x_receive_data(int fd, int revents, void *cb_data)
{
struct sr_dev_inst *sdi;
.priv = NULL,
};
-
SR_PRIV struct sr_dev_driver siemens_b102x_driver_info = {
.name = "siemens-b102x",
.longname = "Siemens B102x DMMs",
unsigned char *raw_sample_buf;
};
-
SR_PRIV extern const char *ols_channel_names[NUM_CHANNELS + 1];
SR_PRIV int send_shortcommand(struct sr_serial_dev_inst *serial,
return dev_clear(di);
}
-
static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg)
{
return ret;
}
-
static int set_trigger(const struct sr_dev_inst *sdi, int stage)
{
struct dev_context *devc;
return SR_OK;
}
-
-
static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
{
struct dev_context *devc;
return SR_OK;
}
-
SR_PRIV int p_ols_receive_data(int fd, int revents, void *cb_data)
{
struct dev_context *devc;
#define FTDI_BUF_SIZE (16 * 1024)
-
#define NUM_CHANNELS 32
#define NUM_TRIGGER_STAGES 4
#define CLOCK_RATE SR_MHZ(100)
unsigned char *raw_sample_buf;
};
-
SR_PRIV extern const char *p_ols_channel_names[NUM_CHANNELS + 1];
SR_PRIV int write_shortcommand(struct dev_context *devc, uint8_t command);
SR_PRIV int write_longcommand(struct dev_context *devc, uint8_t command, uint8_t *data);
{ SCPI_CMD_GET_OVER_CURRENT_PROTECTION_ACTIVE, ":SOUR:CURR:PROT:TRIP?" },
};
-
SR_PRIV const struct scpi_pps pps_profiles[] = {
/* HP 6632B */
{ "HP", "6632B", 0,
philips_pm2800_probe_channels,
},
};
-SR_PRIV unsigned int num_pps_profiles = ARRAY_SIZE(pps_profiles);
+SR_PRIV unsigned int num_pps_profiles = ARRAY_SIZE(pps_profiles);
return SR_OK;
}
-
/* Due to the modular nature of the Testo hardware, you can't assume
* which measurements the device will supply. Fetch a single result
* set synchronously to see which measurements it has. */
g_slist_free(analog.channels);
}
}
-
SR_PRIV gboolean testo_check_packet_prefix(unsigned char *buf, int len);
SR_PRIV uint16_t crc16_mcrf4xx(uint16_t crc, uint8_t *data, size_t len);
SR_PRIV void testo_receive_packet(const struct sr_dev_inst *sdi);
+
#endif
SR_PRIV struct sr_dev_driver uni_t_ut32x_driver_info;
-
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
return std_init(sr_ctx, di, LOG_PREFIX);
/* Can get called on an unused driver, doesn't matter. */
return SR_OK;
-
ret = std_dev_clear(di, NULL);
g_free(drvc);
static const uint32_t drvopts[] = {
SR_CONF_MULTIMETER,
};
+
static const uint32_t scanopts[] = {
SR_CONF_CONN,
};
/* Can get called on an unused driver, doesn't matter. */
return SR_OK;
-
ret = std_dev_clear(di, NULL);
g_free(drvc);
#define DLM_DIVISION_FOR_WORD_FORMAT (3200)
#define DLM_DIVISION_FOR_BYTE_FORMAT (12.5)
-
enum trigger_slopes {
SLOPE_POSITIVE,
SLOPE_NEGATIVE
return sr_scpi_send(scpi, ":LOGIC:MODE OFF");
}
-
int dlm_response_headers_set(struct sr_scpi_dev_inst *scpi,
const gboolean value)
{
return sr_scpi_send(scpi, ":STOP");
}
-
int dlm_acq_length_get(struct sr_scpi_dev_inst *scpi,
uint32_t *response)
{
g_free((gpointer)in);
}
-
/** @} */
gchar *identifier;
};
-
/*
* Reads a single VCD section from input file and parses it to name/contents.
* e.g. $timescale 1ps $end => "timescale" "1ps"
return SR_ERR_DATA;
}
-
if (fmt_code == WAVE_FORMAT_PCM) {
} else if (fmt_code == WAVE_FORMAT_IEEE_FLOAT) {
if (unitsize != 4) {
.receive = receive,
.end = end,
};
-
sr_config_free(cfg);
return ret;
-
}
/*
switch (is_secondary << 8 | buf[0]) {
case 0x001:
- return is_parallel ?
+ return is_parallel ?
SR_MQ_PARALLEL_INDUCTANCE : SR_MQ_SERIES_INDUCTANCE;
case 0x002:
return is_parallel ?
return MODEL_PAR;
else
return MODEL_SER;
-
}
static gboolean packet_valid(const uint8_t *pkt)
.receive = receive,
.cleanup = cleanup,
};
-
-
# -----------------------------------------------------------------------------\n\
# 0\t\tSample counter (for internal gnuplot purposes)\n";
-
static int init(struct sr_output *o, GHashTable *options)
{
struct context *ctx;
.receive = receive,
.cleanup = cleanup,
};
-
.receive = receive,
.cleanup = cleanup,
};
-
.receive = receive,
.cleanup = cleanup,
};
-
#define EOM 0x01
#define TERM_CHAR_ENABLED 0x02
-
static GSList *scpi_usbtmc_libusb_scan(struct drv_context *drvc)
{
struct libusb_device **devlist;
return SR_OK;
}
+
/**
* Start a session.
*
extern SR_PRIV struct sr_dev_driver session_driver;
static int session_driver_initialized = 0;
-
/** @private */
SR_PRIV int sr_sessionfile_check(const char *filename)
{