Drop trailing whitespace in various files.
This commit is contained in:
parent
faf6dc4633
commit
176d785d33
2
NEWS
2
NEWS
|
@ -155,7 +155,7 @@ Note: This release DOES change the libsigrok API. That means it is NOT
|
|||
- Check for the numpy Python module (bug #533).
|
||||
- Check for zip_discard(), provide alternative if not available (bug #674).
|
||||
* Portability:
|
||||
- Android: Add fallbacks for missing stoi()/stod().
|
||||
- Android: Add fallbacks for missing stoi()/stod().
|
||||
- FreeBSD: Fix a libusb related compiler error.
|
||||
- FreeBSD: Fix an issue with libusb_get_port_numbers().
|
||||
- FreeBSD: Fix an issue with BSD Make (bug #556).
|
||||
|
|
|
@ -768,7 +768,7 @@ vector<shared_ptr<Channel>> ChannelGroup::channels()
|
|||
return result;
|
||||
}
|
||||
|
||||
Trigger::Trigger(shared_ptr<Context> context, string name) :
|
||||
Trigger::Trigger(shared_ptr<Context> context, string name) :
|
||||
_structure(sr_trigger_new(name.c_str())),
|
||||
_context(move(context))
|
||||
{
|
||||
|
@ -812,7 +812,7 @@ TriggerStage::TriggerStage(struct sr_trigger_stage *structure) :
|
|||
TriggerStage::~TriggerStage()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
int TriggerStage::number() const
|
||||
{
|
||||
return _structure->stage;
|
||||
|
|
|
@ -11,25 +11,25 @@
|
|||
%pragma(java) jniclassimports=%{
|
||||
/**
|
||||
* @mainpage API Reference
|
||||
*
|
||||
*
|
||||
* Introduction
|
||||
* ------------
|
||||
*
|
||||
*
|
||||
* The sigrok-java API provides an object-oriented Java interface to the
|
||||
* functionality in libsigrok. It is built on top of the libsigrokcxx C++ API.
|
||||
*
|
||||
*
|
||||
* Getting started
|
||||
* ---------------
|
||||
*
|
||||
*
|
||||
* Usage of the sigrok-java API needs to begin with a call to Context.create().
|
||||
* This will create the global libsigrok context and returns a Context object.
|
||||
* Methods on this object provide access to the hardware drivers, input and
|
||||
* output formats supported by the library, as well as means of creating other
|
||||
* objects such as sessions and triggers.
|
||||
*
|
||||
*
|
||||
* Error handling
|
||||
* --------------
|
||||
*
|
||||
*
|
||||
* When any libsigrok C API call returns an error, an Error exception is raised,
|
||||
* which provides access to the error code and description.
|
||||
*/
|
||||
|
@ -197,7 +197,7 @@ MAP_COMMON(const sigrok::ConfigKey *, Glib::VariantBase, ConfigKey, Variant)
|
|||
|
||||
%typemap(in, numinputs=0) JNIEnv * %{
|
||||
$1 = jenv;
|
||||
%}
|
||||
%}
|
||||
|
||||
/* Thread safe JNIEnv handling */
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package org.sigrok.core.interfaces;
|
|||
|
||||
import org.sigrok.core.classes.LogLevel;
|
||||
|
||||
public interface LogCallback
|
||||
public interface LogCallback
|
||||
{
|
||||
public void run(LogLevel loglevel, String message);
|
||||
}
|
||||
|
|
|
@ -276,7 +276,7 @@ struct dev_context {
|
|||
extern SR_PRIV const uint64_t samplerates[];
|
||||
extern SR_PRIV const size_t samplerates_count;
|
||||
|
||||
SR_PRIV int sigma_write_register(uint8_t reg, uint8_t *data, size_t len,
|
||||
SR_PRIV int sigma_write_register(uint8_t reg, uint8_t *data, size_t len,
|
||||
struct dev_context *devc);
|
||||
SR_PRIV int sigma_set_register(uint8_t reg, uint8_t value, struct dev_context *devc);
|
||||
SR_PRIV int sigma_write_trigger_lut(struct triggerlut *lut, struct dev_context *devc);
|
||||
|
|
|
@ -130,21 +130,21 @@ SR_PRIV gboolean brymen_packet_is_valid(const uint8_t *buf)
|
|||
int i;
|
||||
uint8_t chksum = 0;
|
||||
uint8_t *payload;
|
||||
|
||||
|
||||
payload = (uint8_t *)(buf + sizeof(struct brymen_header));
|
||||
|
||||
hdr = (void *)buf;
|
||||
tail = (void *)(payload + hdr->len);
|
||||
|
||||
|
||||
for (i = 0; i< hdr->len; i++)
|
||||
chksum ^= payload[i];
|
||||
|
||||
|
||||
if (tail->checksum != chksum) {
|
||||
sr_dbg("Packet has invalid checksum 0x%.2x. Expected 0x%.2x.",
|
||||
chksum, tail->checksum);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -709,7 +709,7 @@ static int config_set(uint32_t key, GVariant *data,
|
|||
if (i < 0)
|
||||
return SR_ERR_ARG;
|
||||
devc->dslogic_clock_edge = i;
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
ret = SR_ERR_NA;
|
||||
}
|
||||
|
|
|
@ -363,7 +363,7 @@ SR_PRIV int dslogic_fpga_configure(const struct sr_dev_inst *sdi)
|
|||
v16 |= 1 << 2;
|
||||
}
|
||||
if (devc->limit_samples > DS_MAX_LOGIC_DEPTH *
|
||||
ceil(devc->cur_samplerate * 1.0 / DS_MAX_LOGIC_SAMPLERATE)
|
||||
ceil(devc->cur_samplerate * 1.0 / DS_MAX_LOGIC_SAMPLERATE)
|
||||
&& !devc->dslogic_continuous_mode) {
|
||||
/* Enable RLE for long captures.
|
||||
* Without this, captured data present errors.
|
||||
|
|
|
@ -135,7 +135,7 @@ SR_PRIV int gwinstek_gds_800_receive_data(int fd, int revents, void *cb_data)
|
|||
if (devc->cur_acq_frame == devc->frame_limit - 1) {
|
||||
/* All frames accquired. */
|
||||
sr_spew("All frames acquired.");
|
||||
|
||||
|
||||
sdi->driver->dev_acquisition_stop(sdi);
|
||||
return TRUE;
|
||||
} else {
|
||||
|
@ -143,7 +143,7 @@ SR_PRIV int gwinstek_gds_800_receive_data(int fd, int revents, void *cb_data)
|
|||
if (devc->df_started) {
|
||||
packet.type = SR_DF_FRAME_END;
|
||||
sr_session_send(sdi, &packet);
|
||||
|
||||
|
||||
packet.type = SR_DF_FRAME_BEGIN;
|
||||
sr_session_send(sdi, &packet);
|
||||
}
|
||||
|
@ -271,7 +271,7 @@ SR_PRIV int gwinstek_gds_800_receive_data(int fd, int revents, void *cb_data)
|
|||
if (devc->df_started) {
|
||||
packet.type = SR_DF_FRAME_END;
|
||||
sr_session_send(sdi, &packet);
|
||||
|
||||
|
||||
packet.type = SR_DF_FRAME_BEGIN;
|
||||
sr_session_send(sdi, &packet);
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ SR_PRIV int mso_configure_trigger(const struct sr_dev_inst *sdi)
|
|||
trigger_config |= 0x20; //DSO level trigger & width < trigger_width
|
||||
break;
|
||||
case 2:
|
||||
trigger_config |= 0x40; //DSO level trigger & width >= trigger_width
|
||||
trigger_config |= 0x40; //DSO level trigger & width >= trigger_width
|
||||
break;
|
||||
case 3:
|
||||
trigger_config |= 0x60; //LA combination trigger
|
||||
|
|
|
@ -113,7 +113,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
|
|||
if (p_ols_open(devc) != SR_OK) {
|
||||
goto err_free_ftdic;
|
||||
}
|
||||
|
||||
|
||||
/* The discovery procedure is like this: first send the Reset
|
||||
* command (0x00) 5 times, since the device could be anywhere
|
||||
* in a 5-byte command. Then send the ID command (0x02).
|
||||
|
@ -642,8 +642,8 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
|
|||
sr_dbg("flag_reg = %x", devc->flag_reg);
|
||||
|
||||
/*
|
||||
* In demux mode the OLS is processing two 8-bit or 16-bit samples
|
||||
* in parallel and for this to work the lower two bits of the four
|
||||
* In demux mode the OLS is processing two 8-bit or 16-bit samples
|
||||
* in parallel and for this to work the lower two bits of the four
|
||||
* "channel_disable" bits must be replicated to the upper two bits.
|
||||
*/
|
||||
flag_tmp = devc->flag_reg;
|
||||
|
|
|
@ -128,7 +128,7 @@ SR_PRIV int p_ols_open(struct dev_context *devc)
|
|||
goto err_open_close_ftdic;
|
||||
}
|
||||
sr_dbg("FTDI chip read data chunk size set successfully.");
|
||||
|
||||
|
||||
return SR_OK;
|
||||
|
||||
err_open_close_ftdic:
|
||||
|
@ -443,7 +443,7 @@ SR_PRIV int p_ols_receive_data(int fd, int revents, void *cb_data)
|
|||
sr_spew("Received byte 0x%.2x.", byte);
|
||||
|
||||
if ((devc->flag_reg & FLAG_DEMUX) && (devc->flag_reg & FLAG_RLE)) {
|
||||
/* RLE in demux mode must be processed differently
|
||||
/* RLE in demux mode must be processed differently
|
||||
* since in this case the RLE encoder is operating on pairs of samples.
|
||||
*/
|
||||
if (devc->num_bytes == num_channels * 2) {
|
||||
|
@ -499,7 +499,7 @@ SR_PRIV int p_ols_receive_data(int fd, int revents, void *cb_data)
|
|||
* sample.
|
||||
*/
|
||||
devc->tmp_sample[i] = devc->sample[j++];
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Clear out the most significant bit of the sample */
|
||||
devc->tmp_sample[devc->num_bytes - 1] &= 0x7f;
|
||||
|
@ -517,7 +517,7 @@ SR_PRIV int p_ols_receive_data(int fd, int revents, void *cb_data)
|
|||
* sample.
|
||||
*/
|
||||
devc->tmp_sample2[i] = devc->sample[j++];
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Clear out the most significant bit of the sample */
|
||||
devc->tmp_sample2[devc->num_bytes - 1] &= 0x7f;
|
||||
|
@ -597,7 +597,7 @@ SR_PRIV int p_ols_receive_data(int fd, int revents, void *cb_data)
|
|||
* sample.
|
||||
*/
|
||||
devc->tmp_sample[i] = devc->sample[j++];
|
||||
}
|
||||
}
|
||||
}
|
||||
memcpy(devc->sample, devc->tmp_sample, 4);
|
||||
sr_spew("Expanded sample: 0x%.8x.", sample);
|
||||
|
|
|
@ -177,7 +177,7 @@ static int rigol_ds_trigger_wait(const struct sr_dev_inst *sdi)
|
|||
if (!(devc = sdi->priv))
|
||||
return SR_ERR;
|
||||
|
||||
/*
|
||||
/*
|
||||
* If timebase < 50 msecs/DIV just sleep about one sweep time except
|
||||
* for really fast sweeps.
|
||||
*/
|
||||
|
|
|
@ -137,7 +137,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
|
|||
return SR_ERR_DEV_CLOSED;
|
||||
|
||||
std_session_send_df_header(sdi);
|
||||
|
||||
|
||||
sr_sw_limits_acquisition_start(&devc->limits);
|
||||
|
||||
/* Poll every 500ms, or whenever some data comes in. */
|
||||
|
|
|
@ -102,7 +102,7 @@ static int hid_chip_init(struct sr_dev_inst *sdi, uint16_t baudrate)
|
|||
struct sr_usb_dev_inst *usb;
|
||||
|
||||
usb = sdi->conn;
|
||||
|
||||
|
||||
/* Detach kernel drivers which grabbed this device (if any). */
|
||||
if (libusb_kernel_driver_active(usb->devhdl, 0) == 1) {
|
||||
ret = libusb_detach_kernel_driver(usb->devhdl, 0);
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
*
|
||||
* skip: Allows skipping until given timestamp in the file.
|
||||
* This can speed up analyzing of long captures.
|
||||
*
|
||||
*
|
||||
* Value < 0: Skip until first timestamp listed in
|
||||
* the file. (default)
|
||||
*
|
||||
|
|
|
@ -152,11 +152,11 @@ static int modbus_serial_rtu_read_data(void *priv, uint8_t *buf, int maxlen)
|
|||
struct modbus_serial_rtu *modbus = priv;
|
||||
int ret;
|
||||
|
||||
ret = serial_read_nonblocking(modbus->serial, buf, maxlen);
|
||||
ret = serial_read_nonblocking(modbus->serial, buf, maxlen);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
modbus->crc = modbus_serial_rtu_crc(modbus->crc, buf, ret);
|
||||
return ret;
|
||||
modbus->crc = modbus_serial_rtu_crc(modbus->crc, buf, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int modbus_serial_rtu_read_end(void *priv)
|
||||
|
|
|
@ -46,7 +46,7 @@ static int realloc_chanbufs(const struct sr_output *o, int size)
|
|||
|
||||
outc = o->priv;
|
||||
for (i = 0; i < outc->num_channels; i++) {
|
||||
if (!(outc->chanbuf[i] = g_try_realloc(outc->chanbuf[i], sizeof(float) * size))) {
|
||||
if (!(outc->chanbuf[i] = g_try_realloc(outc->chanbuf[i], sizeof(float) * size))) {
|
||||
sr_err("Unable to allocate enough output buffer memory.");
|
||||
return SR_ERR;
|
||||
}
|
||||
|
|
|
@ -617,7 +617,7 @@ static int scpi_usbtmc_libusb_close(struct sr_scpi_dev_inst *scpi)
|
|||
if ((ret = libusb_release_interface(usb->devhdl, uscpi->interface)) < 0)
|
||||
sr_err("Failed to release interface: %s.",
|
||||
libusb_error_name(ret));
|
||||
|
||||
|
||||
if (uscpi->detached_kernel_driver) {
|
||||
if ((ret = libusb_attach_kernel_driver(usb->devhdl,
|
||||
uscpi->interface)) < 0)
|
||||
|
|
Loading…
Reference in New Issue