Various minor whitespace fixes.
This commit is contained in:
parent
e8be616955
commit
1beccaed46
|
@ -544,7 +544,6 @@ SR_API const char *sr_dev_inst_connid_get(const struct sr_dev_inst *sdi)
|
|||
}
|
||||
#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. */
|
||||
|
|
|
@ -783,7 +783,6 @@ static int convert_trigger(const struct sr_dev_inst *sdi)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
return SR_OK;
|
||||
}
|
||||
|
||||
|
@ -949,7 +948,6 @@ static int get_trigger_offset(uint8_t *samples, uint16_t last_sample,
|
|||
return i & 0x7;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Return the timestamp of "DRAM cluster".
|
||||
*/
|
||||
|
|
|
@ -75,7 +75,6 @@ static struct pps_model models[] = {
|
|||
},
|
||||
};
|
||||
|
||||
|
||||
SR_PRIV struct sr_dev_driver atten_pps3203_driver_info;
|
||||
|
||||
static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
|
||||
|
|
|
@ -164,4 +164,3 @@ SR_PRIV int atten_pps3xxx_receive_data(int fd, int revents, void *cb_data)
|
|||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "protocol.h"
|
||||
|
||||
#define SERIALCOMM "9600/8n1"
|
||||
|
||||
/* 23ms is the longest interval between tokens. */
|
||||
#define MAX_SCAN_TIME 25 * 1000
|
||||
|
||||
|
@ -66,8 +67,8 @@ static const char *data_sources[] = {
|
|||
"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)
|
||||
{
|
||||
|
|
|
@ -404,7 +404,6 @@ SR_PRIV int cem_dt_885x_receive_data(int fd, int revents, void *cb_data)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static int wait_for_token(const struct sr_dev_inst *sdi, int8_t *tokens, int timeout)
|
||||
{
|
||||
struct dev_context *devc;
|
||||
|
|
|
@ -183,7 +183,6 @@ SR_PRIV struct sr_dev_driver demo_driver_info;
|
|||
|
||||
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);
|
||||
|
|
|
@ -386,7 +386,6 @@ static void handle_qm_19x_data(const struct sr_dev_inst *sdi, char **tokens)
|
|||
/* Don't have valid metadata yet. */
|
||||
return;
|
||||
|
||||
|
||||
if (devc->mq == SR_MQ_RESISTANCE && isnan(fvalue))
|
||||
fvalue = INFINITY;
|
||||
else if (devc->mq == SR_MQ_CONTINUITY) {
|
||||
|
|
|
@ -58,7 +58,6 @@ static const uint32_t devopts_bd[] = {
|
|||
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
|
||||
|
|
|
@ -602,7 +602,6 @@ static void decode_rs_2x_TR2(uint8_t rs, struct dev_context *devc)
|
|||
devc->scale *= -1.0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Decode special chars (Metrahit 2x).
|
||||
*
|
||||
|
@ -1497,7 +1496,6 @@ SR_PRIV const char *gmc_model_str(enum model mcode)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/** @copydoc sr_dev_driver.config_set
|
||||
*/
|
||||
SR_PRIV int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
|
||||
|
|
|
@ -62,7 +62,6 @@ static const char *data_sources[] = {
|
|||
|
||||
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);
|
||||
|
@ -236,7 +235,6 @@ static int cleanup(const struct sr_dev_driver *di)
|
|||
/* Can get called on an unused driver, doesn't matter. */
|
||||
return SR_OK;
|
||||
|
||||
|
||||
ret = std_dev_clear(di, NULL);
|
||||
g_free(drvc);
|
||||
|
||||
|
|
|
@ -152,7 +152,6 @@ static int cleanup(const struct sr_dev_driver *di)
|
|||
/* Can get called on an unused driver, doesn't matter. */
|
||||
return SR_OK;
|
||||
|
||||
|
||||
ret = std_dev_clear(di, NULL);
|
||||
g_free(drvc);
|
||||
|
||||
|
@ -390,7 +389,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
|
|||
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)
|
||||
|
|
|
@ -54,7 +54,6 @@ static const struct elusb_profile profiles[] = {
|
|||
{ 0, NULL, 0 }
|
||||
};
|
||||
|
||||
|
||||
static libusb_device_handle *lascar_open(struct libusb_device *dev)
|
||||
{
|
||||
libusb_device_handle *dev_hdl;
|
||||
|
|
|
@ -441,7 +441,6 @@ static GSList *do_scan(lps_modelid modelid, struct sr_dev_driver *drv, GSList *o
|
|||
goto exit_err;
|
||||
}
|
||||
|
||||
|
||||
g_strstrip(buf);
|
||||
verstr = buf + 4;
|
||||
}
|
||||
|
|
|
@ -131,7 +131,6 @@ static void process_line(struct sr_dev_inst *sdi)
|
|||
devc->buflen = 0;
|
||||
}
|
||||
|
||||
|
||||
SR_PRIV int motech_lps_30x_receive_data(int fd, int revents, void *cb_data)
|
||||
{
|
||||
struct sr_dev_inst *sdi;
|
||||
|
|
|
@ -321,7 +321,6 @@ SR_PRIV struct sr_dev_driver norma_dmm_driver_info = {
|
|||
.priv = NULL,
|
||||
};
|
||||
|
||||
|
||||
SR_PRIV struct sr_dev_driver siemens_b102x_driver_info = {
|
||||
.name = "siemens-b102x",
|
||||
.longname = "Siemens B102x DMMs",
|
||||
|
|
|
@ -101,7 +101,6 @@ struct dev_context {
|
|||
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,
|
||||
|
|
|
@ -229,7 +229,6 @@ static int cleanup(const struct sr_dev_driver *di)
|
|||
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)
|
||||
{
|
||||
|
@ -469,7 +468,6 @@ static int dev_close(struct sr_dev_inst *sdi)
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static int set_trigger(const struct sr_dev_inst *sdi, int stage)
|
||||
{
|
||||
struct dev_context *devc;
|
||||
|
@ -706,8 +704,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi,
|
|||
return SR_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
|
||||
{
|
||||
struct dev_context *devc;
|
||||
|
|
|
@ -384,7 +384,6 @@ SR_PRIV int p_ols_set_samplerate(const struct sr_dev_inst *sdi,
|
|||
return SR_OK;
|
||||
}
|
||||
|
||||
|
||||
SR_PRIV int p_ols_receive_data(int fd, int revents, void *cb_data)
|
||||
{
|
||||
struct dev_context *devc;
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
|
||||
#define FTDI_BUF_SIZE (16 * 1024)
|
||||
|
||||
|
||||
#define NUM_CHANNELS 32
|
||||
#define NUM_TRIGGER_STAGES 4
|
||||
#define CLOCK_RATE SR_MHZ(100)
|
||||
|
@ -118,7 +117,6 @@ struct dev_context {
|
|||
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);
|
||||
|
|
|
@ -302,7 +302,6 @@ struct scpi_command philips_pm2800_cmd[] = {
|
|||
{ SCPI_CMD_GET_OVER_CURRENT_PROTECTION_ACTIVE, ":SOUR:CURR:PROT:TRIP?" },
|
||||
};
|
||||
|
||||
|
||||
SR_PRIV const struct scpi_pps pps_profiles[] = {
|
||||
/* HP 6632B */
|
||||
{ "HP", "6632B", 0,
|
||||
|
@ -350,5 +349,5 @@ SR_PRIV const struct scpi_pps pps_profiles[] = {
|
|||
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);
|
||||
|
|
|
@ -51,7 +51,6 @@ SR_PRIV int testo_set_serial_params(struct sr_usb_dev_inst *usb)
|
|||
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. */
|
||||
|
@ -289,4 +288,3 @@ SR_PRIV void testo_receive_packet(const struct sr_dev_inst *sdi)
|
|||
g_slist_free(analog.channels);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -80,4 +80,5 @@ SR_PRIV int testo_request_packet(const struct sr_dev_inst *sdi);
|
|||
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
|
||||
|
|
|
@ -41,7 +41,6 @@ static const char *data_sources[] = {
|
|||
|
||||
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);
|
||||
|
@ -182,7 +181,6 @@ static int cleanup(const struct sr_dev_driver *di)
|
|||
/* Can get called on an unused driver, doesn't matter. */
|
||||
return SR_OK;
|
||||
|
||||
|
||||
ret = std_dev_clear(di, NULL);
|
||||
g_free(drvc);
|
||||
|
||||
|
|
|
@ -238,4 +238,3 @@ SR_PRIV int uni_t_ut32x_handle_events(int fd, int revents, void *cb_data)
|
|||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data);
|
|||
static const uint32_t drvopts[] = {
|
||||
SR_CONF_MULTIMETER,
|
||||
};
|
||||
|
||||
static const uint32_t scanopts[] = {
|
||||
SR_CONF_CONN,
|
||||
};
|
||||
|
@ -195,7 +196,6 @@ static int cleanup(const struct sr_dev_driver *di)
|
|||
/* Can get called on an unused driver, doesn't matter. */
|
||||
return SR_OK;
|
||||
|
||||
|
||||
ret = std_dev_clear(di, NULL);
|
||||
g_free(drvc);
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
#define DLM_DIVISION_FOR_WORD_FORMAT (3200)
|
||||
#define DLM_DIVISION_FOR_BYTE_FORMAT (12.5)
|
||||
|
||||
|
||||
enum trigger_slopes {
|
||||
SLOPE_POSITIVE,
|
||||
SLOPE_NEGATIVE
|
||||
|
|
|
@ -253,7 +253,6 @@ int dlm_digital_pod_state_set(struct sr_scpi_dev_inst *scpi, int pod,
|
|||
return sr_scpi_send(scpi, ":LOGIC:MODE OFF");
|
||||
}
|
||||
|
||||
|
||||
int dlm_response_headers_set(struct sr_scpi_dev_inst *scpi,
|
||||
const gboolean value)
|
||||
{
|
||||
|
@ -268,7 +267,6 @@ int dlm_acquisition_stop(struct sr_scpi_dev_inst *scpi)
|
|||
return sr_scpi_send(scpi, ":STOP");
|
||||
}
|
||||
|
||||
|
||||
int dlm_acq_length_get(struct sr_scpi_dev_inst *scpi,
|
||||
uint32_t *response)
|
||||
{
|
||||
|
|
|
@ -590,5 +590,4 @@ SR_API void sr_input_free(const struct sr_input *in)
|
|||
g_free((gpointer)in);
|
||||
}
|
||||
|
||||
|
||||
/** @} */
|
||||
|
|
|
@ -87,7 +87,6 @@ struct vcd_channel {
|
|||
gchar *identifier;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Reads a single VCD section from input file and parses it to name/contents.
|
||||
* e.g. $timescale 1ps $end => "timescale" "1ps"
|
||||
|
|
|
@ -73,7 +73,6 @@ static int parse_wav_header(GString *buf, struct context *inc)
|
|||
return SR_ERR_DATA;
|
||||
}
|
||||
|
||||
|
||||
if (fmt_code == WAVE_FORMAT_PCM) {
|
||||
} else if (fmt_code == WAVE_FORMAT_IEEE_FLOAT) {
|
||||
if (unitsize != 4) {
|
||||
|
@ -370,4 +369,3 @@ SR_PRIV struct sr_input_module input_wav = {
|
|||
.receive = receive,
|
||||
.end = end,
|
||||
};
|
||||
|
||||
|
|
|
@ -305,7 +305,6 @@ static int send_config_update_key(struct sr_dev_inst *sdi, uint32_t key,
|
|||
sr_config_free(cfg);
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -607,7 +606,6 @@ static unsigned int parse_model(const uint8_t *pkt)
|
|||
return MODEL_PAR;
|
||||
else
|
||||
return MODEL_SER;
|
||||
|
||||
}
|
||||
|
||||
static gboolean packet_valid(const uint8_t *pkt)
|
||||
|
|
|
@ -258,5 +258,3 @@ SR_PRIV struct sr_output_module output_ascii = {
|
|||
.receive = receive,
|
||||
.cleanup = cleanup,
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -43,7 +43,6 @@ static const char *gnuplot_header2 = "\
|
|||
# -----------------------------------------------------------------------------\n\
|
||||
# 0\t\tSample counter (for internal gnuplot purposes)\n";
|
||||
|
||||
|
||||
static int init(struct sr_output *o, GHashTable *options)
|
||||
{
|
||||
struct context *ctx;
|
||||
|
|
|
@ -258,4 +258,3 @@ SR_PRIV struct sr_output_module output_hex = {
|
|||
.receive = receive,
|
||||
.cleanup = cleanup,
|
||||
};
|
||||
|
||||
|
|
|
@ -318,4 +318,3 @@ SR_PRIV struct sr_output_module output_srzip = {
|
|||
.receive = receive,
|
||||
.cleanup = cleanup,
|
||||
};
|
||||
|
||||
|
|
|
@ -357,4 +357,3 @@ SR_PRIV struct sr_output_module output_wav = {
|
|||
.receive = receive,
|
||||
.cleanup = cleanup,
|
||||
};
|
||||
|
||||
|
|
|
@ -92,7 +92,6 @@ enum {
|
|||
#define EOM 0x01
|
||||
#define TERM_CHAR_ENABLED 0x02
|
||||
|
||||
|
||||
static GSList *scpi_usbtmc_libusb_scan(struct drv_context *drvc)
|
||||
{
|
||||
struct libusb_device **devlist;
|
||||
|
|
|
@ -447,6 +447,7 @@ static int verify_trigger(struct sr_trigger *trigger)
|
|||
|
||||
return SR_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Start a session.
|
||||
*
|
||||
|
|
|
@ -49,7 +49,6 @@
|
|||
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)
|
||||
{
|
||||
|
|
|
@ -219,4 +219,3 @@ SR_PRIV int soft_trigger_logic_check(struct soft_trigger_logic *stl,
|
|||
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue