]> sigrok.org Git - libsigrok.git/log
libsigrok.git
11 years agoadded VID:PIDs for all Hantek DSO-2xxx/5xxx
Bert Vermeulen [Fri, 28 Dec 2012 15:46:21 +0000 (16:46 +0100)]
added VID:PIDs for all Hantek DSO-2xxx/5xxx

11 years agoconfigure.ac: Fix CFLAGS settings.
Uwe Hermann [Fri, 28 Dec 2012 10:22:16 +0000 (11:22 +0100)]
configure.ac: Fix CFLAGS settings.

Don't override/overwrite CFLAGS in configure.ac, but rather amend it
with (currently) "-Wall -Wextra -fvisibility=hidden".

This properly allows users/packagers to do things like:

 ./configure (this will default to using "-g -O2" additionally)

 CFLAGS="-g -O2" ./configure (same as above)

 CFLAGS="" ./configure (no additional flags)

 CFLAGS="-g -O0" ./configure (disable optimization, e.g. for valgrind use)

 etc. etc.

11 years agoserial-dmm: Rename VOLTCRAFT_VC820 to VOLTCRAFT_VC820_SER.
Uwe Hermann [Wed, 19 Dec 2012 21:50:07 +0000 (22:50 +0100)]
serial-dmm: Rename VOLTCRAFT_VC820 to VOLTCRAFT_VC820_SER.

This matches the _ser suffix of the other functions/variables for this
device ("ser" denotes that it is used with the serial UNI-T UT-D02 cable
as opposed the USB/HID based cables which are handled by the uni-t-dmm driver).

But more importantly, the _SER suffix for the enum value will prevent
name clashes later, when the uni-t-dmm driver gets a VOLTCRAFT_VC820 enum.

Do the same for VOLTCRAFT_VC840.

11 years agoFix limit_samples check in various drivers.
Uwe Hermann [Wed, 26 Dec 2012 00:29:27 +0000 (01:29 +0100)]
Fix limit_samples check in various drivers.

Check whether a sample limit was actually set (> 0) before checking if
that sample limit is reached. This also fixes continuous acquisition mode
for drivers which have that.

11 years agoShorten probe_names[] arrays everywhere.
Uwe Hermann [Tue, 25 Dec 2012 23:12:52 +0000 (00:12 +0100)]
Shorten probe_names[] arrays everywhere.

Also, NULL-terminate all of them.

11 years agonexus-osciprime: suppress warnings
Bert Vermeulen [Tue, 25 Dec 2012 23:01:37 +0000 (00:01 +0100)]
nexus-osciprime: suppress warnings

11 years agoserial-dmm: Handle time-limited acquisition
Alexandru Gagniuc [Sun, 23 Dec 2012 18:48:48 +0000 (12:48 -0600)]
serial-dmm: Handle time-limited acquisition

Implement SR_HWCAP_LIMIT_MSEC capability, to allow acquisition to automatically
stop after a specified amount of time.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agors9lcd: Fix segfault with unusual modes.
Alexandru Gagniuc [Tue, 25 Dec 2012 22:21:24 +0000 (16:21 -0600)]
rs9lcd: Fix segfault with unusual modes.

Some unusual modes required re-parsing the value. Instead of assigning the
re-parsed value to *floatval, it was reassigned directly to *analog->data;
however, analog->data is not initialized at this point, causing a segfault.
This situation was created when moving the radioshack-dmm code to serial-dmm,
with the segfault not being observed at that time.

Do not write directly to analog->data, but instead use the intermediate
variable rawval.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agors9lcd: Convenience fixes
Alexandru Gagniuc [Tue, 25 Dec 2012 21:40:30 +0000 (15:40 -0600)]
rs9lcd: Convenience fixes

Convert bit masks from hardcoded hex values to bit shifts. For example 0x80
becomes (1 << 7). This also fixes a typo error in the definition of INFO_DIODE.

Add comments explaining that some case values in sr_rs9lcd_parse() are meant to
fall through without a 'break;', and explain some of the unusual modes.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoadded Nexus-Computing OsciPrime VID:PID
Bert Vermeulen [Tue, 25 Dec 2012 18:13:20 +0000 (19:13 +0100)]
added Nexus-Computing OsciPrime VID:PID

11 years agonexus-osciprime: basic scanning functionality
Bert Vermeulen [Tue, 25 Dec 2012 18:09:12 +0000 (19:09 +0100)]
nexus-osciprime: basic scanning functionality

Unfortunately the device doesn't have an EEPROM on board at all, and so
initially enumerates with the default Cypress FX2 VID:PID (04b4:8613).
Since we already support using plain FX2* as basic logic analyzers using
the fx2lafw firmware, we cannot support that same VID:PID for the
OsciPrime. Therefore a USB conn is required for the initial scan.

However, once the firmware is uploaded the device re-enumerates as
04b4:1004, which we do detect for scanning automatically.

Thus, the OsciPrime driver requires one scan with conn parameter to get
the firmware uploaded, but it will then keep working until powered off.

11 years agonexus-osciprime: Initial driver skeleton.
Bert Vermeulen [Mon, 24 Dec 2012 19:11:38 +0000 (20:11 +0100)]
nexus-osciprime: Initial driver skeleton.

11 years agofluke-dmm: Properly handle continuous mode
Bert Vermeulen [Mon, 24 Dec 2012 19:27:45 +0000 (20:27 +0100)]
fluke-dmm: Properly handle continuous mode

Same bug+fix as commit d55c89f523e74a2f629bb23e8fd9bf6db7e3758a

11 years agosession.c: Remove all remaining sources on sr_session_stop
Alexandru Gagniuc [Wed, 19 Dec 2012 10:15:18 +0000 (04:15 -0600)]
session.c: Remove all remaining sources on sr_session_stop

Some sources may not be necessarily associated with a device. The best example
is the anykey pollfd from sigrok-cli. sr_session_stop only removes sources
associated with hardware devices via dev_acquisition_stop. Sources such as
anykey are not removed, and thus session->num_sources will not get to 0. As a
result, we may get into situations where the event loop enters an infinite
state.

To prevent this, all we have to do is remove any active sources that are still
present after dev_acquisition_stop has been called for all devices.

This fixes bug 14.

11 years agoasix-sigma: Quickfix for an ASIX SIGMA issue.
Uwe Hermann [Mon, 24 Dec 2012 15:57:55 +0000 (16:57 +0100)]
asix-sigma: Quickfix for an ASIX SIGMA issue.

It's not entirely clear whether this is the right fix, but we're merging
it for now, pending later review.

See also: http://sigrok.org/bugzilla/show_bug.cgi?id=26

11 years agofx2lafw: Tidied probe_names
Joel Holdsworth [Tue, 11 Dec 2012 20:51:53 +0000 (20:51 +0000)]
fx2lafw: Tidied probe_names

11 years agools: Split into api.c and protocol.[ch].
Uwe Hermann [Sun, 23 Dec 2012 19:41:27 +0000 (20:41 +0100)]
ols: Split into api.c and protocol.[ch].

Also, drop various no longer needed #include files.

11 years agools: Use logging helper macro.
Uwe Hermann [Sun, 23 Dec 2012 18:09:11 +0000 (19:09 +0100)]
ols: Use logging helper macro.

11 years agofluke-dmm: 190 series scopemeter support
Bert Vermeulen [Mon, 24 Dec 2012 10:00:55 +0000 (11:00 +0100)]
fluke-dmm: 190 series scopemeter support

199B only for now.

11 years agofluke-dmm: parser cleanup
Bert Vermeulen [Mon, 24 Dec 2012 09:59:41 +0000 (10:59 +0100)]
fluke-dmm: parser cleanup

11 years agofluke-dmm: adapt scanner to accomodate 190 series scopemeters
Bert Vermeulen [Mon, 24 Dec 2012 09:56:54 +0000 (10:56 +0100)]
fluke-dmm: adapt scanner to accomodate 190 series scopemeters

11 years agofluke-dmm: make poll timeout configurable
Bert Vermeulen [Mon, 24 Dec 2012 09:40:04 +0000 (10:40 +0100)]
fluke-dmm: make poll timeout configurable

Defaulted to 1s before, but a simple "QM" command on a 199B in scope
mode takes 1.7s to come through.

11 years agoserial: more debug cleanup
Bert Vermeulen [Sun, 23 Dec 2012 17:54:24 +0000 (18:54 +0100)]
serial: more debug cleanup

11 years agoserial: get rid of overly verbose spew
Bert Vermeulen [Thu, 20 Dec 2012 09:41:48 +0000 (10:41 +0100)]
serial: get rid of overly verbose spew

It just made spew-level logging unusable; the way sigrok async comms work
guarantees most of it was a false error.

11 years agoalsa: Split into api.c and protocol.c
Alexandru Gagniuc [Thu, 20 Dec 2012 17:33:49 +0000 (11:33 -0600)]
alsa: Split into api.c and protocol.c

This is the driver model agreed upon for all drivers.

As a result of the split, a devc->num_probes field had to be added in order to
reduce the interdependence between api.c and protocol.c .

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agodevice.c: Fix memory leak in sr_serial_dev_inst_free
Alexandru Gagniuc [Thu, 20 Dec 2012 03:39:38 +0000 (21:39 -0600)]
device.c: Fix memory leak in sr_serial_dev_inst_free

sr_serial_dev_inst_free() freed all members of sr_serial_dev_inst, but did not
free the struct itself, as expected from a free_*() function. This inadvertently
caused a memory leak in every place sr_serial_dev_inst is used.

Free the struct itself

+ g_free(serial);

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoserial-dmm: Properly handle continuous mode
Alexandru Gagniuc [Sat, 22 Dec 2012 22:00:44 +0000 (16:00 -0600)]
serial-dmm: Properly handle continuous mode

serial-dmm does not check if a sample limit is actually in place before deciding
to stop acquisition. Since the sample limit is set at 0 by default, operating
in continuous mode will cause acquisition to stop before even sending the first
sample.

Check to make sure we actually are in a sample-limited mode before stopping for
this reason.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoconfigure.ac: Improve check for libusb-1.0.
Uwe Hermann [Sat, 22 Dec 2012 00:33:03 +0000 (01:33 +0100)]
configure.ac: Improve check for libusb-1.0.

PKG_CHECK_MODULES() checks for libusb-1.0 via pkg-config already, no
need to use a "manual" additional check via AC_CHECK_LIB() just to set
HAVE_LIBUSB_1_0 in config.h.

This helps with cross-compiling setups, among other things.

11 years agoalsa: Update to latest APIs/conventions.
Uwe Hermann [Mon, 17 Dec 2012 18:39:13 +0000 (19:39 +0100)]
alsa: Update to latest APIs/conventions.

The alsa driver was out of date wrt APIs and libsigrok conventions in
general, and wasn't compiling.

This fixes the compile and updates it to _basically_ work with the current
state of analog support in libsigrok.

This is not finished/full support for ALSA analog sampling yet, though,
various TODOs remain that will be addressed later.

11 years agoPass sr_datafeed_packets and payloads with const pointers
Joel Holdsworth [Thu, 13 Dec 2012 21:07:53 +0000 (21:07 +0000)]
Pass sr_datafeed_packets and payloads with const pointers

This patch marks packet structures and their payloads as const.
This indicates to packet receivers that modifications to these are
not allowed. In general all pointers should be marked const unless
modification of the referenced data is explicitly allowed.

11 years agohardware/agilent-dmm/Makefile.am: Fix typo.
Uwe Hermann [Tue, 18 Dec 2012 01:25:17 +0000 (02:25 +0100)]
hardware/agilent-dmm/Makefile.am: Fix typo.

11 years agochronovu-la8: Fix memory leak in hw_scan
Alexandru Gagniuc [Mon, 17 Dec 2012 08:04:35 +0000 (02:04 -0600)]
chronovu-la8: Fix memory leak in hw_scan

Hardware scanning creates an ftdi_context before attempting to locate devices
based on PID/VID. If no devices are detected, execution jumps to cleanup. The
context is freed with free(), instead of ftdi_free().

We cannot assume that the libftdi context is stored in a contiguous memory
region, and thus cannot use a simple free. Case in point, this situation is
identified by valgrind as a "definitely lost" memory leak.

Use ftdi_free() instead of a simple free() in hw_scan(). Valgrind no longer
complains about a memory leak in this area.

clear_instances() does not need any modification, as it correctly uses
ftdi_free().

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agofx2lafw: Fix int64_t printing.
Uwe Hermann [Tue, 18 Dec 2012 00:30:34 +0000 (01:30 +0100)]
fx2lafw: Fix int64_t printing.

11 years agofx2lafw: Various cosmetics, typo fixes, etc.
Uwe Hermann [Tue, 18 Dec 2012 00:26:58 +0000 (01:26 +0100)]
fx2lafw: Various cosmetics, typo fixes, etc.

11 years agoConsistently use 'di' as variable name.
Uwe Hermann [Mon, 17 Dec 2012 23:52:39 +0000 (00:52 +0100)]
Consistently use 'di' as variable name.

Use 'di' consistently in all drivers as the name for a local, static
pointer to the respective driver's 'struct sr_dev_driver'.

11 years agofx2lafw: Print device failed to renumerate error
Alexandru Gagniuc [Thu, 6 Dec 2012 21:55:14 +0000 (15:55 -0600)]
fx2lafw: Print device failed to renumerate error

commit 378abfeac6cc94d88dc82b8481dec9c9f691f3da tried to solve a bug where
the fx2lafw driver would print "Device came back" even if a timeout had occured.

It solved that issue, but inadvertently introduced a new bug:
"Device came back" would be printed even if no firmware upload was performed.
This is counterintuitive, as the device is only reset when a firmware upload is
performed.

There are three cases:
i)   Firmware upload was successful
ii)  Firmware upload failed
iii) Firmware upload was NOT needed

Each case warrants a separate message from the driver. Print the
following messages depending on the outcome:

i)   "Device came back"
ii)  "Device failed to renumerate"
iii) "Firmware upload was not needed."

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agofx2lafw: Use DRIVER_LOG_DOMAIN for log messages
Alexandru Gagniuc [Thu, 13 Dec 2012 21:08:05 +0000 (15:08 -0600)]
fx2lafw: Use DRIVER_LOG_DOMAIN for log messages

Use the new DRIVER_LOG_DOMAIN mechanism, where explicitly writing
the driver name in the message string is no longer required.

Thus:

- sr_err("fx2lafw: Something bad happened.");

becomes:

+ sr_err("Something bad happened.");

In either case, the log output is the same.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoserial_stream_detect(): Drop unneeded sr_spew().
Uwe Hermann [Sun, 16 Dec 2012 21:27:04 +0000 (22:27 +0100)]
serial_stream_detect(): Drop unneeded sr_spew().

11 years agoserial-dmm: Add Voltcraft VC-840 (UT-D02) support.
Uwe Hermann [Sun, 16 Dec 2012 21:17:48 +0000 (22:17 +0100)]
serial-dmm: Add Voltcraft VC-840 (UT-D02) support.

This works with the UNI-T UT-D02 (RS232) cable. For the USB/HID
based cable (UNI-T UT-D04), the uni-t-dmm driver must be used.

Note: This is untested, but should work just fine for all settings, with
the possible exception of temperature (testers needed!)

11 years agoserial-dmm: Add Voltcraft VC-820 (UT-D02) support.
Uwe Hermann [Sun, 16 Dec 2012 21:03:28 +0000 (22:03 +0100)]
serial-dmm: Add Voltcraft VC-820 (UT-D02) support.

This works with the UNI-T UT-D02 (RS232) cable. For the USB/HID
based cable (UNI-T UT-D04), the uni-t-dmm driver must be used.

11 years agoserial-dmm: Eliminate unneeded "subdriver" field.
Uwe Hermann [Sun, 16 Dec 2012 20:28:26 +0000 (21:28 +0100)]
serial-dmm: Eliminate unneeded "subdriver" field.

Just use the 'int dmm' + wrapper method that is used for all other
functions which need this information. There is no real need to
special-case the hw_dev_acquisition_start() API call here.

11 years agoserial-dmm: Cosmetics, documentation fixes.
Uwe Hermann [Sun, 16 Dec 2012 20:23:49 +0000 (21:23 +0100)]
serial-dmm: Cosmetics, documentation fixes.

11 years agolascar-el-usb: fix sample limit parameter
Bert Vermeulen [Sun, 16 Dec 2012 22:06:15 +0000 (23:06 +0100)]
lascar-el-usb: fix sample limit parameter

11 years agolinsigrok.h: Document meaning of SR_UNIT_CONCENTRATION
Alexandru Gagniuc [Sat, 15 Dec 2012 17:03:10 +0000 (11:03 -0600)]
linsigrok.h: Document meaning of SR_UNIT_CONCENTRATION

Having concentration as a unit is vague, as it can be expressed in
many ways. In the context of sigrok, concentration means a normalized
number from 0 to 1.

Document its meaning.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agolascar-el-usb: support for EL-USB-2*
Bert Vermeulen [Sun, 16 Dec 2012 17:48:20 +0000 (18:48 +0100)]
lascar-el-usb: support for EL-USB-2*

11 years agoadd relative humidity MQ
Bert Vermeulen [Sun, 16 Dec 2012 17:38:44 +0000 (18:38 +0100)]
add relative humidity MQ

11 years agoanalog: support ppm output
Bert Vermeulen [Sat, 15 Dec 2012 21:50:33 +0000 (22:50 +0100)]
analog: support ppm output

11 years agolascar-el-usb: properly submit CO concentration as a PPM value
Bert Vermeulen [Sat, 15 Dec 2012 21:49:40 +0000 (22:49 +0100)]
lascar-el-usb: properly submit CO concentration as a PPM value

11 years agolascar-el-usb: add config saver
Bert Vermeulen [Sat, 15 Dec 2012 21:34:40 +0000 (22:34 +0100)]
lascar-el-usb: add config saver

11 years agolascar-el-usb: EL-USB-CO300 support
Bert Vermeulen [Sat, 15 Dec 2012 10:15:30 +0000 (11:15 +0100)]
lascar-el-usb: EL-USB-CO300 support

Works the same way as the EL-USB-CO, but with the more sensitive sensor,
so should work out of the box.

11 years agocosmetics
Bert Vermeulen [Sat, 15 Dec 2012 10:07:18 +0000 (11:07 +0100)]
cosmetics

11 years agoadd MQ/units for carbon monoxide concentration
Bert Vermeulen [Sat, 15 Dec 2012 09:50:22 +0000 (10:50 +0100)]
add MQ/units for carbon monoxide concentration

11 years agolascar-el-usb: generic EL-USB support + EL-USB-CO support
Bert Vermeulen [Sat, 15 Dec 2012 03:06:51 +0000 (04:06 +0100)]
lascar-el-usb: generic EL-USB support + EL-USB-CO support

11 years agousb: strip overly verbose debugging
Bert Vermeulen [Sun, 9 Dec 2012 14:19:39 +0000 (15:19 +0100)]
usb: strip overly verbose debugging

11 years agovictor-dmm: free in the right order
Bert Vermeulen [Sun, 9 Dec 2012 13:40:12 +0000 (14:40 +0100)]
victor-dmm: free in the right order

11 years agousb: strip useless code
Bert Vermeulen [Sun, 9 Dec 2012 13:39:17 +0000 (14:39 +0100)]
usb: strip useless code

11 years agoserial-dmm: Use dummy info struct for rs9lcd parser
Alexandru Gagniuc [Thu, 13 Dec 2012 18:35:06 +0000 (12:35 -0600)]
serial-dmm: Use dummy info struct for rs9lcd parser

The rs9lcd parser, which is used for the RadioShack 22-812 does not use its
*info parameter, and therefore did not have a rs9lcd_info struct declared.

With recent re-factoring of the receive data callbacks, it became necessary to
pass a struct pointer. This made the RECV_DATA macro look like:

- RECV_DATA(RADIOSHACK_22_812, metex14)

giving the wrong impression that the RadioShack 22-182 uses the
metex14 protocol, which is not the case.

Create a dummy rs9lcd_info struct, and correctly identify the parser
as rs9lcd in the RECV_DATA macro:

+ RECV_DATA(RADIOSHACK_22_812, rs9lcd)

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agolibsigrok.h: Don't store subdriver in sr_dev_driver
Alexandru Gagniuc [Thu, 13 Dec 2012 17:08:38 +0000 (11:08 -0600)]
libsigrok.h: Don't store subdriver in sr_dev_driver

Not all drivers use subdrivers. The only reason the subdriver field was
introduced was to accomodate the model of serial-dmm.

The sr_dev_driver struct is available to the frontend. Exposing the subdriver
field creates the problem of exposing knowledge of libsigrok's internal driver
layout, even though the drivers are designed to be a flat list to the frontend.

Store the subdriver in the dev_context struct of serial-dmm.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoserial-dmm: Remove global sr_dev_driver *di alias
Alexandru Gagniuc [Thu, 13 Dec 2012 16:53:28 +0000 (10:53 -0600)]
serial-dmm: Remove global sr_dev_driver *di alias

The global *di alias was used to keep track of the driver context.
It caused issues with trying to use several subdrivers at once, so
its use was obsoleted.

The correct context is preserved through different mechanisms, either
the *sdi pointer, or wrappers which pass the correct context.

The *di alias is no longer used, so remove it.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoserial-dmm: Simplify wrapper layout
Alexandru Gagniuc [Thu, 13 Dec 2012 14:58:01 +0000 (08:58 -0600)]
serial-dmm: Simplify wrapper layout

Wrappers for hw_init, hw_cleanup, clear_instances, and hw_scan are needed for
each subdriver due to the nature of serial-dmm. These wrappers are implemented
as macros, in order to reduce the number of lines of code.

For each of those functions, we have a separate wrapper list, then we connect
them together in a first-class driver using a DRV macro, and yet another list
(the DRV list).

Instead of declaring those wrappers in separate lists, include them in the DRV
macro. This approach reduces the number of macro lists from five to just one.

From the perspective of adding a new subdriver, this also greatly reduces the
number of places needed to hook in a new device.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoserial-dmm: Add per-driver clear_instances() wrappers.
Uwe Hermann [Thu, 13 Dec 2012 00:54:13 +0000 (01:54 +0100)]
serial-dmm: Add per-driver clear_instances() wrappers.

11 years agoserial-dmm: Add per-driver hw_cleanup() wrappers.
Uwe Hermann [Thu, 13 Dec 2012 00:47:02 +0000 (01:47 +0100)]
serial-dmm: Add per-driver hw_cleanup() wrappers.

11 years agoserial-dmm: Add per-driver hw_dev_list() wrappers.
Uwe Hermann [Thu, 13 Dec 2012 00:41:34 +0000 (01:41 +0100)]
serial-dmm: Add per-driver hw_dev_list() wrappers.

11 years agoserial-dmm: Add per-driver hw_scan() wrappers.
Uwe Hermann [Thu, 13 Dec 2012 00:27:31 +0000 (01:27 +0100)]
serial-dmm: Add per-driver hw_scan() wrappers.

11 years agoserial-dmm: Use a macro for receive_data() wrappers.
Uwe Hermann [Thu, 13 Dec 2012 00:19:17 +0000 (01:19 +0100)]
serial-dmm: Use a macro for receive_data() wrappers.

11 years agoserial-dmm: Use a macro for driver struct simplification.
Uwe Hermann [Wed, 12 Dec 2012 23:59:42 +0000 (00:59 +0100)]
serial-dmm: Use a macro for driver struct simplification.

11 years agoserial-dmm: Simplify code a bit.
Uwe Hermann [Tue, 11 Dec 2012 16:06:04 +0000 (17:06 +0100)]
serial-dmm: Simplify code a bit.

Store/use the receive_data() function and a pointer to the driver struct
in the dmms[] array. Use a ".subdriver" entry in the driver struct.
Use a macro to simplify hw_init() wrappers.

11 years agoserial-dmm: Avoid duplicate symbol error
Alexandru Gagniuc [Sun, 9 Dec 2012 19:15:24 +0000 (13:15 -0600)]
serial-dmm: Avoid duplicate symbol error

Declare dmm_info dmms as extern in protocol.h to prevent duplicate
symbol error from the linker.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agofx2lafw: Don't say "Device came back" when it didn't
Joel Holdsworth [Thu, 6 Dec 2012 21:31:37 +0000 (21:31 +0000)]
fx2lafw: Don't say "Device came back" when it didn't

11 years agoserial-dmm: Fix segfault when no device is used
Alexandru Gagniuc [Wed, 5 Dec 2012 21:16:52 +0000 (15:16 -0600)]
serial-dmm: Fix segfault when no device is used

di was initialized as NULL. If no device covered by this driver
is used, di remains NULL. This causes a segmentation fault when
calling clear_instances().

Check for di being NULL.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agobackend.c: Return a sigrok error in sr_init() on libusb_init() errors
Peter Stuge [Sat, 3 Nov 2012 07:29:26 +0000 (08:29 +0100)]
backend.c: Return a sigrok error in sr_init() on libusb_init() errors

11 years agobackend.c: Fix memory leak in sr_init() error path
Peter Stuge [Sat, 3 Nov 2012 07:27:48 +0000 (08:27 +0100)]
backend.c: Fix memory leak in sr_init() error path

Commit 785b9ff290cbdb86e7d0b0280c33b43faf9c0518 added libusb init into
sr_init() which can generate an error. In this case, the already
allocated struct sr_context would have leaked.

11 years agohardware: A few further USB error message fixups
Peter Stuge [Wed, 5 Dec 2012 00:23:49 +0000 (01:23 +0100)]
hardware: A few further USB error message fixups

11 years agohardware: Call libusb_error_name() in all USB-related error messages
Peter Stuge [Tue, 4 Dec 2012 20:11:25 +0000 (21:11 +0100)]
hardware: Call libusb_error_name() in all USB-related error messages

11 years agolascar-el-usb: add scanning functionality
Bert Vermeulen [Tue, 4 Dec 2012 22:58:26 +0000 (23:58 +0100)]
lascar-el-usb: add scanning functionality

11 years agoadd thermometer and hygrometer HWCAPs
Bert Vermeulen [Tue, 4 Dec 2012 22:58:03 +0000 (23:58 +0100)]
add thermometer and hygrometer HWCAPs

11 years agousb: sr_usb_find() uses standardized connection string to find a USB device
Bert Vermeulen [Tue, 4 Dec 2012 22:25:11 +0000 (23:25 +0100)]
usb: sr_usb_find() uses standardized connection string to find a USB device

11 years agoadd VID:PID for generic SILabs F32x USBXpress chips
Bert Vermeulen [Tue, 4 Dec 2012 22:11:40 +0000 (23:11 +0100)]
add VID:PID for generic SILabs F32x USBXpress chips

Used in Lascar EL-USB series devices

11 years agoezusb: Use DRIVER_LOG_DOMAIN for debug output
Alexandru Gagniuc [Tue, 4 Dec 2012 19:31:49 +0000 (13:31 -0600)]
ezusb: Use DRIVER_LOG_DOMAIN for debug output

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agotondaj-sl-814: Fix unused parameter warning
Alexandru Gagniuc [Tue, 4 Dec 2012 01:39:58 +0000 (19:39 -0600)]
tondaj-sl-814: Fix unused parameter warning

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agohardware: Make USB drivers use the libusb_context in struct sr_context
Peter Stuge [Mon, 3 Dec 2012 02:33:24 +0000 (03:33 +0100)]
hardware: Make USB drivers use the libusb_context in struct sr_context

11 years agohw_init(): Save struct sr_context * parameter in struct drv_context
Peter Stuge [Mon, 3 Dec 2012 01:49:36 +0000 (02:49 +0100)]
hw_init(): Save struct sr_context * parameter in struct drv_context

11 years agoAdd a struct sr_context * parameter to hw_init()
Peter Stuge [Mon, 3 Dec 2012 01:47:55 +0000 (02:47 +0100)]
Add a struct sr_context * parameter to hw_init()

11 years agoAdd a struct sr_context * parameter to sr_driver_init()
Peter Stuge [Mon, 3 Dec 2012 01:42:57 +0000 (02:42 +0100)]
Add a struct sr_context * parameter to sr_driver_init()

Since the public API is changed, this commit also bumps the libtool
version component SR_LIB_VERSION_CURRENT in configure.ac.

11 years agoalsa: Remove unused and unprovided hw_init() parameter `devname'
Peter Stuge [Mon, 3 Dec 2012 00:34:23 +0000 (01:34 +0100)]
alsa: Remove unused and unprovided hw_init() parameter `devname'

11 years agolascar-el-usb: Initial driver skeleton.
Bert Vermeulen [Tue, 27 Nov 2012 16:40:14 +0000 (17:40 +0100)]
lascar-el-usb: Initial driver skeleton.

11 years agoRemove some radioshack-dmm leftovers.
Uwe Hermann [Sun, 2 Dec 2012 20:58:34 +0000 (21:58 +0100)]
Remove some radioshack-dmm leftovers.

11 years agoserial.c: Be more verbose about failing to parse parameter string
Alexandru Gagniuc [Sun, 2 Dec 2012 19:34:51 +0000 (13:34 -0600)]
serial.c: Be more verbose about failing to parse parameter string

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoradioshack-dmm: Integrate into serial-dmm
Alexandru Gagniuc [Sun, 2 Dec 2012 19:15:21 +0000 (13:15 -0600)]
radioshack-dmm: Integrate into serial-dmm

Use the infrastructure of serial-dmm to handle the RadioShack 22-812,
and completely remove radioshack-dmm.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoradioshack-dmm: Separate protocol parser from driver
Alexandru Gagniuc [Sun, 2 Dec 2012 18:58:30 +0000 (12:58 -0600)]
radioshack-dmm: Separate protocol parser from driver

Move the parsing part of radioshack-dmm into a separate protocol
parser, following the model from hardware/common/dmm.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoradioshack-dmm: Fix opening of serial port.
Alexandru Gagniuc [Sun, 2 Dec 2012 18:43:37 +0000 (12:43 -0600)]
radioshack-dmm: Fix opening of serial port.

During scan the serial port is opened with SERIAL_RDONLY | SERIAL_NONBLOCK,
which works fine, but when acquisition starts, it is opened only with
SERIAL_RDONLY. On Linux, if cdc_acm can make a claim to the USB to serial
converter, opening the port will fail.

Open port with SERIAL_RDONLY | SERIAL_NONBLOCK.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoserial-dmm: Add RadioShack 22-168 support.
Alexandru Gagniuc [Sun, 2 Dec 2012 15:17:46 +0000 (09:17 -0600)]
serial-dmm: Add RadioShack 22-168 support.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agodemo: Add missing dev_clear() API call.
Uwe Hermann [Sun, 2 Dec 2012 16:21:13 +0000 (17:21 +0100)]
demo: Add missing dev_clear() API call.

11 years agosr_init(): Add driver sanity checks.
Uwe Hermann [Sun, 11 Nov 2012 22:54:49 +0000 (23:54 +0100)]
sr_init(): Add driver sanity checks.

After sr_init() has successfully run, we can be sure that all drivers
define all the API calls, so we don't have to do these checks later
in the individual API functions / wrappers.

If there are one or more drivers with missing API functions (or driver
name / longname, and so on), sr_init() will fail. This helps catch this
kind of developer error early on.

11 years agoserial-dmm: Drop accidentally committed file.
Uwe Hermann [Sun, 2 Dec 2012 15:11:42 +0000 (16:11 +0100)]
serial-dmm: Drop accidentally committed file.

11 years agoReduce glib minimum version to 2.28.0 again.
Uwe Hermann [Sun, 2 Dec 2012 15:09:31 +0000 (16:09 +0100)]
Reduce glib minimum version to 2.28.0 again.

We no longer use g_thread_try_new() which is only available since 2.32.0.

11 years agodemo: Do not use a separate thread for generating data
Alexandru Gagniuc [Sun, 2 Dec 2012 00:07:10 +0000 (18:07 -0600)]
demo: Do not use a separate thread for generating data

We already have an event-based mechanism in place. Using a thread just
adds unneeded complexity, especially for a driver designed not for
performance, but for providing a testbed to frontends.
Generate the data in the event handler, not in a separate thread.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoserial-dmm: Add PCE PCE-DM32 support.
Uwe Hermann [Sun, 2 Dec 2012 00:32:57 +0000 (01:32 +0100)]
serial-dmm: Add PCE PCE-DM32 support.

11 years agoserial-dmm: Add PeakTech 4370 support.
Uwe Hermann [Sun, 2 Dec 2012 00:02:16 +0000 (01:02 +0100)]
serial-dmm: Add PeakTech 4370 support.

11 years agoserial-dmm: Add Metex M-3640D support.
Uwe Hermann [Sat, 1 Dec 2012 23:40:15 +0000 (00:40 +0100)]
serial-dmm: Add Metex M-3640D support.