Commit Graph

1776 Commits

Author SHA1 Message Date
Martin Ling e1960467ce gmc-mh-1x-2x: Make serial write call block, and fix error handling.
This call was previously nonblocking, but there is no handling of partial
writes. It is called from config_set where it is free to block.

Also fix error handling: serial_write can return any negative error code,
not just -1.
2014-09-24 23:30:30 +02:00
Martin Ling 4a0eda2b70 gmc-mh-1x-2x: Mark serial read calls as nonblocking.
These calls were already nonblocking since the driver opens the port with the
SERIAL_NONBLOCK flag. They only read one byte. A return value of zero is not
handled, but should not occur in theory due to the G_IO_IN check. It might be
good to add handling of a zero return anyway, since I'm not sure if this is
always accurate.
2014-09-24 23:30:30 +02:00
Martin Ling 0714a010cc gmc-mh-1x-2x: Mark serial read call as nonblocking.
This call was already nonblocking since the driver opens the port with the
SERIAL_NONBLOCK flag. It only reads one byte, and a zero result is handled
appropriately.
2014-09-24 23:30:30 +02:00
Martin Ling bb27c76513 fluke-dmm: Make serial write calls block, and fix error handling.
These calls are executed from an event handler and were previously nonblocking,
but have no partial write handling. They send short packets so should be OK to
block, most likely the output buffer will be empty anyway.

Also fix error handling for these calls, which seems to have been retained from
previous direct usage of write() to a serial port fd.
2014-09-24 23:30:30 +02:00
Martin Ling 50276118ca fluke-dmm: Make serial write calls block, and fix error handling.
These calls were previously nonblocking, but have no partial write handling.
They are made from scan and acquisition_start contexts where they are free
to block.

Remove the SERIAL_NONBLOCK at open, which only applied during scan, since all
calls in the scan are now explicitly blocking.

Also fix error handling for these calls, which appears to have been kept
from a previous direct usage of write() on a serial port fd.
2014-09-24 23:30:30 +02:00
Martin Ling 707fa85ad5 fluke-dmm: Mark serial read call as nonblocking.
This call was already nonblocking since the driver opens the port with the
SERIAL_NONBLOCK flag. Only one byte is read. The case of 0 being returned
is not handled, but the call is only made if G_IO_IN occurred so in theory,
there should be a byte available. It might be wise to add handling for a
return of 0 nonetheless, as I'm not sure if this is always accurate.
2014-09-24 23:30:23 +02:00
Martin Ling 55e32714f9 conrad-digi-35-cpu: Make serial write call block.
This call was previously nonblocking, but there is no partial write handling.
It is only called from config_set so it is free to block.
2014-09-24 23:30:01 +02:00
Martin Ling 0ac161bba0 conrad-digi-35-cpu: Remove SERIAL_NONBLOCK flag from open at scan time.
This open call is only made to check access, the port is closed immediately
afterwards. The flag therefore has no effect.
2014-09-24 23:30:01 +02:00
Martin Ling c9fc06d7f0 colead-slm: Mark serial read calls as nonblocking.
This is an odd one. These calls are made from a receive handler so should not
block, and appear to be setup correctly to handle partial reads or no data
available. However, the driver was not opening the port with SERIAL_NONBLOCK
so these calls would have been blocking. Make them nonblocking.
2014-09-24 23:30:01 +02:00
Martin Ling 258a23134d center-3xx: Remove SERIAL_NONBLOCK flag.
All serial calls in this driver are now explicitly (non)blocking.
2014-09-24 23:30:00 +02:00
Martin Ling c1da74fc0a center-3xx: Make serial write call block.
This call is executed from an event handler and was previously nonblocking,
but has no partial write handling. It sends a short packet so should be OK
to block, most likely the output buffer will be empty anyway.
2014-09-24 23:30:00 +02:00
Martin Ling 3582ce8a01 center-3xx: Mark serial read call as nonblocking.
This call was already nonblocking because the driver opens the port with the
SERIAL_NONBLOCK flag. Partial reads are handled.
2014-09-24 23:30:00 +02:00
Martin Ling d7b269da8f cem-dt-885x: Mark serial access as nonblocking, remove SERIAL_NONBLOCK flag.
These calls were already nonblocking since this driver opened the port with
the SERIAL_NONBLOCK flag. Having marked them as such, we can remove the flag.

Also remove an unnecessary reopen of the port to change its blocking status.
2014-09-24 23:30:00 +02:00
Martin Ling ca4266a02f brymen-dmm: Remove SERIAL_NONBLOCK flag.
All serial read/write calls in the driver are now explicitly (non)blocking.
2014-09-24 23:30:00 +02:00
Martin Ling 776313d997 brymen-dmm: Make serial write call block.
This call is executed from an event handler and was previously nonblocking,
but has no partial write handling. It sends a short packet so should be OK
to block, most likely the output buffer will be empty anyway.
2014-09-24 23:30:00 +02:00
Martin Ling 44be13b1f8 brymen-dmm: Mark serial read calls as nonblocking.
The driver opens the port with SERIAL_NONBLOCK so these were already
nonblocking, and are handled appropriately.
2014-09-24 23:30:00 +02:00
Martin Ling 5305266a28 atten-pps3xxx: Remove SERIAL_NONBLOCK.
All serial read/write calls in the driver are now explicitly (non)blocking.
2014-09-24 23:30:00 +02:00
Martin Ling c3116bc311 atten-pps3xxx: Make serial write call block.
This call is executed from an event handler and was previously nonblocking,
but has no partial write handling. It sends a short packet so should be OK
to block, most likely the output buffer will be empty anyway.
2014-09-24 23:30:00 +02:00
Martin Ling e7b4103697 atten-pps3xxx: Make serial write call block in scan.
This is called at scan time so free to block. There is no partial write
handling and a response is expected afterwards. This should therefore be a
blocking call.
2014-09-24 23:30:00 +02:00
Martin Ling 25dd083128 appa-55ii: Mark serial read nonblocking and remove SERIAL_NONBLOCK.
This is the only read/write call in the driver. It is already non-blocking
and is handled appropriately.
2014-09-24 23:29:49 +02:00
Martin Ling 64c536be52 aglient-dmm: Remove SERIAL_NONBLOCK flag.
All serial calls in this driver are now explicitly (non)blocking.
2014-09-24 23:18:21 +02:00
Martin Ling a5053ddd21 agilent-dmm: Make serial write call block in send.
This call is executed from an event handler context was previously
nonblocking, however there is no handling for a partial write.

The output buffer is unlikely to be full and the commands to be sent
are short, so it should be OK to make this a blocking call.
2014-09-24 23:18:21 +02:00
Martin Ling 485b9ae34d agilent-dmm: Make serial write call block in scan.
This call is executed at scan time so is free to block. There is no
handling for a partial write and a response is expected immediately
afterwards. It should therefore be a blocking call.
2014-09-24 23:18:21 +02:00
Martin Ling e0b781a45b agilent-dmm: Mark serial read call as nonblocking.
This driver opens the port with the SERIAL_NONBLOCK flag, so this call is
already a nonblocking one, and is handled appropriately.
2014-09-24 23:18:21 +02:00
Martin Ling 2e360339f9 serial-dmm: Remove SERIAL_NONBLOCK flag.
All serial read/write calls in this driver are now explicitly
nonblocking so there is no need for this flag.
2014-09-24 23:18:20 +02:00
Martin Ling 4277ac349c serial-dmm: Mark serial read/write calls as nonblocking.
This driver opens the port with the SERIAL_NONBLOCK flag so these calls were
already non-blocking.
2014-09-24 23:18:20 +02:00
Martin Ling 02bd1d0298 colead-slm: Mark serial write call as blocking.
This driver opens the port without the SERIAL_NONBLOCK flag,
so this call was already blocking.
2014-09-24 23:18:20 +02:00
Martin Ling bbff0fe0d2 manson-hcs-3xxx: Mark serial read call as blocking.
This driver opens the port without the SERIAL_NONBLOCK flag, so this call is
already a blocking one.
2014-09-24 23:18:20 +02:00
Martin Ling bf505eed6b serial_readline: Implement using sp_blocking_read. 2014-09-24 23:18:20 +02:00
Martin Ling 18e4d5bc45 serial_stream_detect: Make read nonblocking.
This code implements its own waiting based on baudrate, so the read itself
should be nonblocking. In general it will have been already, since drivers
almost universally use the SERIAL_NONBLOCK flag.
2014-09-24 23:18:20 +02:00
Soeren Apel 2fe6210af6 Add serial_num and connection_id fields to sr_dev_inst 2014-09-24 00:40:03 +02:00
Soeren Apel db156e5409 Add usb_get_port_path() helper function
There is currently no way to uniquely identify USB devices in
libsigrok. It uses the "bus.address" scheme which is only
constant as long as the device remains attached to the bus.
In order to allow USB device persistence in PulseView, devices
need to provide a unique identifier even in absence of a
serial number. This function is the first step as it provides
the ability to query the physical location of a USB device.
2014-09-24 00:40:03 +02:00
Bert Vermeulen f12d997948 demo: Fix pattern mode and amplitude option publishing. 2014-09-23 22:40:47 +02:00
Bert Vermeulen 9a10ce65d6 colead-slm: Properly check acquisition sample limit. 2014-09-23 22:27:34 +02:00
Bert Vermeulen 79f92686c6 session: Don't try to send packets if no session has been set.
This indicates a bug, but let's not segfault if it happens.
2014-09-22 00:47:22 +02:00
Bert Vermeulen 04c2f202f2 input/chronovu_la8: Fix broken I/O loop. 2014-09-22 00:47:22 +02:00
Uwe Hermann af945a6625 Typos and consistency fixes. 2014-09-19 01:03:32 +02:00
Bert Vermeulen d4ccb6bd8f yokogawa-dlm: Don't implement dummy scan options. 2014-09-17 17:41:41 +02:00
Bert Vermeulen 5827f61b64 Publish config key capabilities.
Every driver now publishes its device option config keys, i.e. the
list fetched with sr_config_list(SR_CONF_DEVICE_OPTIONS), with a
set of flags indicating which methods are implemented by the driver
for that key.

The config keys are OR'ed with any combination of SR_CONF_GET,
SR_CONF_SET and SR_CONF_LIST. These are defined as the high bits
of the uint32_t config key. Clients can OR config keys with
SR_CONF_MASK to strip out these bits. This mask will be kept up to
date if other bits are added to the capabilities list; clients MUST
therefore use SR_CONF_MASK for this.

Some keys don't have capability bits added, such as the informative
device type keys (SR_CONF_MULTIMETER, SR_CONF_OSCILLOSCOPE, ...) and
SR_CONF_CONTINUOUS.

Scan options do not have capabilities bits.
2014-09-17 15:36:11 +02:00
Bert Vermeulen 138589b02e beaglelogic: Add missing scan options, and cleanup. 2014-09-16 23:51:38 +02:00
Bert Vermeulen a0e0bb4149 Consistently use 'scanopts' variable across all drivers. 2014-09-16 22:19:02 +02:00
Bert Vermeulen f254bc4bba Consistently use 'devopts' variable across all drivers. 2014-09-16 22:11:39 +02:00
Bert Vermeulen 584560f142 Change type of SR_CONF keys to uint32_t. 2014-09-16 21:22:41 +02:00
Martin Ling 13fef1ed24 hwdriver: Validate types of GVariants passed by user. 2014-09-14 04:47:12 +01:00
Martin Ling edbd09250b scpi: Remove trailing carriage returns. 2014-09-11 17:20:28 +02:00
Bert Vermeulen 25f20faf0d input: Add debug output. 2014-09-10 22:55:50 +02:00
Bert Vermeulen 88189019ac input/binary: Fix broken I/O loop. 2014-09-10 22:53:28 +02:00
Bert Vermeulen 013ec84b83 Don't start session with 0-channel devices.
Drivers aren't really able to deal with that in some cases, and it
denotes a frontend bug.
2014-09-10 18:21:51 +02:00
Bert Vermeulen cfd8ec53ab scpi: Don't return NULL device from unsuccessful scan. 2014-09-09 19:53:55 +02:00
Bert Vermeulen bfc8679937 scpi-pps: Clean up HP 6632B profile. 2014-09-09 13:24:30 +02:00
Bert Vermeulen 331f56543a scpi-pps: Fix compile warning. 2014-09-08 23:31:54 +02:00
Bert Vermeulen fdedbfcdef scpi-pps: Fix config_set checks. 2014-09-08 23:30:21 +02:00
Aurelien Jacobs effb9dd1c2 rigol-ds: replace some magic numbers by appropriate constant or variable
This fixes bug #406.
2014-09-08 12:58:30 +02:00
Bert Vermeulen bc4a2a46ed Add support for HP 6632B. 2014-09-08 12:45:21 +02:00
Bert Vermeulen 01b0257aef scpi-pps: Create one channel per MQ/output combination.
This allows frontends to trivially select which MQs on which channels
they want to see; others won't even be fetched.
2014-09-08 12:45:21 +02:00
Bert Vermeulen 379d260965 Add private storage pointer to struct sr_channel. 2014-09-08 12:45:21 +02:00
Bert Vermeulen 478c8d923e scpi-pps: Simplify SCPI command handling. 2014-09-08 12:45:21 +02:00
Bert Vermeulen 3222ee103d scpi-pps: Add support for Rigol DP831A/DP832A. 2014-09-08 12:45:21 +02:00
Bert Vermeulen 58b77c41ff scpi-pps: Use regex to match model names. 2014-09-08 12:45:21 +02:00
Bert Vermeulen 22c18b0370 scpi-pps: Generalize vendor name cleanup. 2014-09-08 12:45:21 +02:00
Bert Vermeulen d4eabea847 scpi-pps: Add support for Rigol DP832. 2014-09-08 12:45:21 +02:00
Bert Vermeulen 9e45cd41fd scpi-pps: Add basic cross-vendor PPS functionality. 2014-09-08 12:45:21 +02:00
Bert Vermeulen a1eaa9e066 Revamp PPS-related config keys. 2014-09-08 12:45:21 +02:00
Bert Vermeulen ca1a7cb56f scpi-pps: Initial driver skeleton. 2014-09-08 12:45:21 +02:00
Aurelien Jacobs af1e487e3f brymen-bm86x: Add current loop sensor support. 2014-09-06 17:22:03 +02:00
Bert Vermeulen 7343ad1ec7 scpi/gpib: Rename backend to scpi_libgpib.
libgpib is the userspace component to linux-gpib's kernel modules that
implement low-level interface drivers.

When libsigrok gets userspace GPIB interface drivers, that backend will
be the "official" scpi_gpib.
2014-09-05 18:33:48 +02:00
Martin Ling bb2a4ed407 Add GPIB SCPI backend using linux-gpib and libgpib. 2014-09-05 10:34:04 +01:00
Bert Vermeulen e8779db70c input/wav: Now really correctly check supported sample size. 2014-09-02 22:09:17 +02:00
Bert Vermeulen 110fe1b4a2 agilent-dmm: U124xx/U125xx: Add current loop sensor support.
Also fixes frequency support.
2014-09-02 21:55:52 +02:00
Bert Vermeulen e82d34a9c2 scpi/usbtmc: Minor debug output changes. 2014-09-02 21:27:16 +02:00
Bert Vermeulen 73145219c0 input/wav: Correctly check supported sample size. 2014-09-02 21:26:15 +02:00
Marcus Comstedt 28d9df7292 input/wav: Fix broken handling of float32 samples on big endian
Also, make sure that floats are 32 bit even in the case of an
extensible header.
2014-09-02 19:14:25 +02:00
Bert Vermeulen c7f5219e62 agilent-dmm: Add temperature regex to U125xx parser. 2014-09-02 01:01:56 +02:00
Bert Vermeulen a965748ae2 agilent-dmm: U124xx/U125xx: support 5 more modes.
This adds support for resistance, capacitance, frequency, continuity,
and temperature.
2014-09-02 00:55:41 +02:00
Matthias Heidbrink 5791bdf604 gmc-mh-1x-2x-rs232: Completed energy measurement ranges (V, A, W) for Metrahit 29S. 2014-09-01 23:14:56 +02:00
Bert Vermeulen ee2bcdfc44 agilent-dmm: U124x/U125x fixes. 2014-09-01 21:44:37 +02:00
Uwe Hermann 129d5bc961 error.c: Add missing entries. 2014-09-01 00:08:53 +02:00
Soeren Apel ac10a927b5 yokogawa-dlm: Replace g_try_malloc() calls and fix coding style 2014-08-31 00:42:10 +02:00
Soeren Apel 0028d5a1ee yokogawa-dlm: Lower timeout to increase throughput and fix data acq bug 2014-08-31 00:42:10 +02:00
Soeren Apel af3487ec28 yokogawa-dlm: Do not block when receiving and save frame length in scope state 2014-08-31 00:42:10 +02:00
Soeren Apel 8ab929d614 yokogawa-dlm: Flesh out driver with current state of development 2014-08-31 00:42:10 +02:00
Soeren Apel 107639373d yokogawa-dlm: Integrate driver skeleton 2014-08-31 00:42:10 +02:00
Bert Vermeulen 6e8d95a50c input/csv: Use uint64 for samplerate option. 2014-08-30 20:16:45 +02:00
Bert Vermeulen edd28877cc input/chronovu_la8: Use uint64 for samplerate option. 2014-08-30 20:15:30 +02:00
Bert Vermeulen 10288172be input/binary: Use uint64 for samplerate option. 2014-08-30 20:13:13 +02:00
Bert Vermeulen 4edba404b0 agilent-dmm: Add U124xx device IDs. 2014-08-30 19:32:15 +02:00
Bert Vermeulen 173378f0f5 agilent-dmm: Add provisional support for the U124xx. 2014-08-29 23:42:06 +02:00
Bert Vermeulen f857bd928d agilent-dmm: Assume all A and B models are identical on the wire. 2014-08-29 23:42:06 +02:00
Bert Vermeulen 51b92b7da4 agilent-dmm: Add RMS flag to AC voltage modes. 2014-08-29 23:42:06 +02:00
Bert Vermeulen f216eb8699 agilent-dmm: Correctly parse negative overload. 2014-08-29 23:42:06 +02:00
Uwe Hermann e6284bf09f Remove unneeded subdriver debug messages. 2014-08-29 23:02:22 +02:00
Bert Vermeulen 7c03b56443 agilent-dmm: Fix value parser.
This considered 0.0 to be an invalid result for no good reason.
2014-08-28 17:44:24 +02:00
Peter Zotov 6f479a0a72 Add support for mcupro Logic16, a Saleae Logic16 clone.
From sigrok's point of view, this analyzer has two differences:

  * It does not require uploading the firmware.
  * It returns garbage in some registers used for sanity checks.
    Saleae's software ignores that garbage; sigrok only does if it
    specifically detects the mcupro clone.
2014-08-28 14:03:21 +02:00
Bert Vermeulen 4f979115a4 input: sr_input_scan_*() now return a status code.
SR_OK: a match was found.
SR_ERR: no match.
SR_ERR_DATA: a match was found but the module cannot handle the input.
SR_OK_CONTINUE: some module didn't have enough data to be sure.
2014-08-28 00:22:13 +02:00
Bert Vermeulen aad21bd866 Add error string for SR_OK_CONTINUE. 2014-08-28 00:19:36 +02:00
Bert Vermeulen b7f446051c Add SR_ERR_DATA. 2014-08-28 00:19:21 +02:00
Bert Vermeulen cbd9e6e987 input/wav: Support for WAVE_FORMAT_EXTENSIBLE.
This is needed for supporting > 16-bit PCM samples.
2014-08-27 15:55:52 +02:00
Bert Vermeulen 962d43440a input/wav: use our own endian macros.
These should work better on non-aligned memory locations.
2014-08-26 22:48:12 +02:00
Bert Vermeulen 5bf0dd6aff Add RB16S and RB32S (signed) macros.
Also note signedness of all the endian macros.
2014-08-26 22:45:38 +02:00
Bert Vermeulen 06ad20bebf input: Avoid warnings on all-zero static struct entries. 2014-08-26 12:38:41 +02:00
Bert Vermeulen b84cba4dbf input: Convert binary module. 2014-08-26 01:55:41 +02:00
Bert Vermeulen 75cb428f9f input: format_match() is not required in an input module. 2014-08-26 01:55:41 +02:00
Bert Vermeulen 02e24c0ce0 input: Convert chronovu-la8 module. 2014-08-26 01:55:41 +02:00
Bert Vermeulen 5e83cd741f input/vcd: Minor code cleanup. 2014-08-26 01:55:41 +02:00
Bert Vermeulen 33e4303baa input: Only feed scanned header to streams, not scanned files. 2014-08-26 01:55:41 +02:00
Bert Vermeulen 115fbe9410 input: Only use header buffer for modules that need it.
The buffer was leaking into modules that didn't ask for it.
2014-08-26 01:55:41 +02:00
Bert Vermeulen 0a4d68f74b input/wav: Send END packet on cleanup. 2014-08-26 01:55:41 +02:00
Bert Vermeulen c10ef17c23 input/vcd: Send END packet on cleanup. 2014-08-26 01:55:41 +02:00
Bert Vermeulen 41d214f61a input: Convert CSV module. 2014-08-26 01:55:41 +02:00
Bert Vermeulen 57486a7528 input: sr_input_new() always allocates the instance buffer. 2014-08-26 01:55:41 +02:00
Bert Vermeulen fe4fe25bf5 input: Fix option enumeration. 2014-08-26 01:55:41 +02:00
Bert Vermeulen d65fcbcd41 input: Fix internal API docs. 2014-08-26 01:55:41 +02:00
Bert Vermeulen bd0bfaafd8 input: Actually return a NULL-terminated array. 2014-08-26 01:55:41 +02:00
Bert Vermeulen 20e8882106 input: Frontends don't need to see SR_INPUT_META_*. 2014-08-26 01:55:41 +02:00
Bert Vermeulen 7db0639495 input: Fixes and VCD. 2014-08-26 01:55:41 +02:00
Bert Vermeulen 0f3dbc9530 input: Fix up API documentation. 2014-08-26 01:55:41 +02:00
Bert Vermeulen 17bfaca62a input: Introduce new input module API.
This is a work in progress.
2014-08-26 01:55:41 +02:00
Bert Vermeulen d514d35dab input: make sr_input{_module} opaque to clients. 2014-08-26 01:55:41 +02:00
Bert Vermeulen d4c937749a input: s/format/module in all naming. 2014-08-26 01:55:41 +02:00
Bert Vermeulen 81a3497655 fx2lafw: Code cleanup. 2014-08-26 01:49:00 +02:00
Bert Vermeulen 1685c27619 Avoid warnings on all-zero static struct entries. 2014-08-26 01:48:27 +02:00
Bert Vermeulen 84cbaf77b4 pipistrello-ols: Disable unused trigger stages.
Thanks to Magnus Karlsson for this fix.
2014-08-25 01:00:55 +02:00
Bert Vermeulen acc885c755 pipistrello-ols: Preliminary port to current API. 2014-08-25 01:00:55 +02:00
magnuskarlsson b94cff407f DEMUX and RLE fixes 2014-08-25 01:00:55 +02:00
magnuskarlsson 1e0de84608 added edge triggers 2014-08-25 01:00:55 +02:00
magnuskarlsson 1f9bcd0f94 fixed typos 2014-08-25 01:00:55 +02:00
magnuskarlsson 72716f15be fixed a problem with USB defines 2014-08-25 01:00:55 +02:00
magnuskarlsson 4bd80e1228 added pipistrello-ols
Conflicts:
	configure.ac
	src/hwdriver.c
2014-08-25 01:00:55 +02:00
Soeren Apel 562b7ae513 hameg-hmo / rigol-ds: Restore compatibility with std_dev_clear() 2014-08-24 16:54:38 +02:00
Martin Ling 14e1aa6df0 rigol-ds: Fix duplicated vendor string for Agilent devices. 2014-08-22 20:15:32 +01:00
Aurelien Jacobs 01f6e330f8 serial: re-implement sr_serial_find_usb() using new libsp APIs 2014-08-20 17:48:26 +02:00
Bert Vermeulen fdefc40aec output: Fix options enumeration. Again. 2014-08-20 17:33:09 +02:00
Martin Ling aba57f3550 Close zip file at end of sr_session_file_check.
From patch sent to sigrok-devel by jerryxjtu.
2014-08-20 14:48:29 +02:00
Marc Schink 879dd50fb6 output: Allocate additional memory for NULL terminator.
Best regards,
Marc

>From a7228150fdea91a65b5d70359bf51b87d2572edf Mon Sep 17 00:00:00 2001
From: Marc Schink <sigrok-dev@marcschink.de>
Date: Wed, 20 Aug 2014 05:34:57 -0400
Subject: [PATCH] output: Allocate additional memory for NULL terminator.
2014-08-20 14:20:55 +02:00
Marc Schink f817f05aac ikalogic-scanaplus: Free device context to fix memory leak.
Best regards,
Marc

>From 779ef3a1150b3679ab357ceb0e2f50785ad90d28 Mon Sep 17 00:00:00 2001
From: Marc Schink <sigrok-dev@marcschink.de>
Date: Wed, 20 Aug 2014 05:42:07 -0400
Subject: [PATCH] ikalogic-scanaplus: Free device context to fix memory leak.
2014-08-20 14:20:55 +02:00
Bert Vermeulen 9fc318d9ef output: Fix double free. 2014-08-19 00:01:57 +02:00
Bert Vermeulen 499c85dce5 output: Fix output option enumeration. 2014-08-19 00:01:57 +02:00
Marcus Comstedt 7754fb4d93 saleae-logic16: Recognize FPGA FIFO overflow status 2014-08-17 16:24:14 +02:00
Bert Vermeulen af7d656d37 output: Constify module options. 2014-08-15 20:24:00 +02:00
Bert Vermeulen fc74643098 output: Actually return a NULL-terminated array.
This returned an array of structs with an NULL-ed element at the end.
The drivers still do this, but the wrappers now make and free a NULL-
terminated array around it.

sr_output_options_free() now takes the pointer returned by
sr_output_options_get(), instead of the module owning it.
2014-08-15 20:23:52 +02:00
Soeren Apel db81fbb582 hameg-hmo: Make sure the enabled_channels list is empty before populating it
Previous runs of dev_acquisition_start() keep the enabled_channels list
populated if they fail. This means that once an invalid channel
configuration was detected, it will be detected again even if the channel
configuration was changed. With this change, the list will be cleared
before being populated so that any stale entries are removed.
2014-08-14 22:43:57 +02:00
Bert Vermeulen 3c1cafebb3 session: Remove irrelevant logging. 2014-08-13 14:34:55 +02:00
Bert Vermeulen 441e9eae58 output/wav: Minor code cleanup. 2014-08-13 14:34:55 +02:00
Bert Vermeulen 63f6df68c6 output: Deal properly with NULL (no) options on a new output instance. 2014-08-13 14:34:55 +02:00
Uwe Hermann 41de54ffb1 sr_session_new(): Return SR_ERR_ARG upon invalid argument.
(instead of segfaulting)
2014-08-11 13:15:43 +02:00
Uwe Hermann 508ddda2a3 session_file.c: Drop left-over extern. 2014-08-11 12:31:01 +02:00
Uwe Hermann 9fcc286604 trigger.c: Add Doxygen @file and @defgroup tags. 2014-08-10 18:59:16 +02:00
Uwe Hermann 7efe889e7a Doxygen: Add a few missing @param lines for sessions.
This fixes a bunch of Doxygen warnings.
2014-08-10 17:31:33 +02:00
Soeren Apel b4e31d2aac Fix typo in the Hameg HMO driver and add some error message for when the float comparison breaks 2014-08-08 17:12:58 +02:00
Bert Vermeulen e336c0413c output/vcd: Drop obsolete string. 2014-08-03 14:09:04 +02:00
Bert Vermeulen 226363c4e8 hameg-hmo: Implement SR_CONF_SCAN_OPTIONS. 2014-08-03 14:00:07 +02:00
Bert Vermeulen 706f482a95 output: Check options hash before destroying. 2014-08-03 01:24:30 +02:00
Bert Vermeulen dcc55fe91a output: Move option checks to the wrapper.
Output modules are now guaranteed:
  - Every option is always given, with the default value if not supplied
    by the user, and is the right GVariantType.
  - No invalid options are ever passed.
2014-08-03 01:16:03 +02:00
Bert Vermeulen 950043c30e output: Modules can keep track of option resources without wrapper help. 2014-08-02 19:20:00 +02:00
Bert Vermeulen 7ea75009d1 output/wav: Add 'scale' option.
Audio tools processing WAV failes generally need the samples to be in
the range -1 to +1. The scale option adds postprocessing to any samples
going into a WAV file, by dividing the sample values by the given factor.
2014-08-02 03:50:27 +02:00
Janne Huttunen a24c3f4a89 Implement Brymen BM25x series as a serial DMM.
The Brymen BM25x series supports the BC-20X that is an opto-isolated
serial cable. The link seems to be unidirectional i.e. when activated
the DMM periodically sends updates to the host while the host cannot
control the DMM in any way.

The protocol is documented in "6000-count-digital-multimeters-r1.pdf"
that is available from the manufacturer. Every 15 byte packet consists
of a bitmap where the bits correspond to segments or symbols on the
LCD display i.e. the DMM essentially sends the contents of its screen
to the host in every update. This driver then decodes the measured
quantity, unit and its value from the bitmap.
2014-08-01 20:31:26 +02:00
Bert Vermeulen 2f6f0e9187 input/vcd: Make less noise in format match failure. 2014-08-01 12:04:20 +02:00
Bert Vermeulen b866fc095d input/csv: Match format on .csv extension in filename. 2014-08-01 12:03:42 +02:00
Bert Vermeulen cb41a838a7 input/wav: Deal with IEEE float samples in WAV files.
This also skips chunks before the 'data' chunk in WAV files, as
this is quite common.
2014-08-01 12:02:09 +02:00
Bert Vermeulen 364859ac73 output/wav: Fix channel deinterleaving. 2014-08-01 12:00:51 +02:00
Bert Vermeulen 6e6babb9d5 output/analog: Fix channel deinterleaving. 2014-08-01 11:57:59 +02:00
Bert Vermeulen 0605f87475 output/wav: Initial module implementation. 2014-07-29 15:46:26 +02:00
Bert Vermeulen afaa75b98c output/wav: Initial module skeleton. 2014-07-29 02:47:10 +02:00
Bert Vermeulen 49224c2853 demo: Attach analog generator to channel, not channel group.
This also adds a new channel group "Analog", which has all analog
channels in it.
2014-07-29 02:00:57 +02:00
Bert Vermeulen d686c5ec46 output: Rename instance private storage pointer to priv.
This makes it consistent with other libsigrok fields used for this purpose.
2014-07-28 16:02:21 +02:00
Bert Vermeulen dddabe3705 demo: Support changing the amplitude of analog channels. 2014-07-28 15:40:26 +02:00
Bert Vermeulen cff7d8d60d Add config key for amplitude.
This is intended for setting (or getting) the amplitude of a source
which doesn't really have an MQ associated with it, such as the demo
driver's analog channels.
2014-07-28 15:40:19 +02:00
Bert Vermeulen a755b0e122 output: Finish output module API wrappers.
The sr_output and sr_output_module structs are now no longer accessible
from the client.
2014-07-26 03:57:17 +02:00
Bert Vermeulen ed0b7fed10 demo: Free analog channel groups when done with them.
This fixes a memory leak.
2014-07-24 21:01:39 +02:00
Bert Vermeulen 886413b6d2 std: Free channel groups from device instances as well. 2014-07-24 21:01:08 +02:00
Bert Vermeulen 4d7b36a0b5 fx2lafw: Check for valid samplerate before setting. 2014-07-23 12:32:35 +02:00
Bert Vermeulen b62bb97afb demo: Support continuous acquisition. 2014-07-23 04:53:25 +02:00
Bert Vermeulen 2f663c826a fx2lafw: Fix continuous mode. 2014-07-23 00:24:39 +02:00
Uwe Hermann b88c3e4923 Drop references to obsolete sigrok-commits mailing list. 2014-07-23 00:04:07 +02:00
Uwe Hermann f4d2042d3c session*.c: Remove some unneeded lines. 2014-07-22 23:25:24 +02:00
Bert Vermeulen 155b680da4 Reorganize project tree. 2014-07-22 18:19:29 +02:00