Commit Graph

147 Commits

Author SHA1 Message Date
Uwe Hermann 93d719cde6 es519xx: Fix incorrect packet size, and a typo. 2013-10-07 00:36:18 +02:00
Uwe Hermann 72e1672fc9 es519xx: Cosmetics, coding style, minor fixes. 2013-10-07 00:36:18 +02:00
Aurelien Jacobs c01bdebc57 add cyrustek es519xx generic protocol parser 2013-10-07 00:36:18 +02:00
Daniel Thompson 5715e84fe3 serial: Only sleep when no characters are received.
g_usleep(XX) sleeps for *at least* XX microseconds but may sleep for
longers (on older kernels the sleep will typically be 10000us). Thus
byte receive loops containing an unconditional sleep will perform
very poorly (for example it causes the scan in agilent-dmm to timeout
prematurely).

Even on modern kernels serial_readline() has a 2ms sleep per byte which
means it will read at a maximum rate of half a character per millisecond
(~4800baud).

This is fixed by only sleeping when read() returns no data.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2013-09-26 14:57:37 +02:00
Uwe Hermann e52bb9be83 Voltcraft VC-830: Fix diode mode handling.
This DMM is not using the standard bits in the FS9922 protocol/structure
to indicate the "volt" and "diode mode" flags. Instead, it only sets the
user-defined bit "z1" to indicate both "diode mode" and "volt".

This fixes #142.
2013-09-01 15:27:21 +02:00
Uwe Hermann a6ed50f405 es51922/fs9721/fs9922/metex14: Use diode MQFLAG.
This fixes #141.
2013-09-01 15:27:07 +02:00
Uwe Hermann 98494dc8a3 fs9922: Fix typo. 2013-09-01 13:41:13 +02:00
Uwe Hermann 045e9a9918 serial.c: Drop unneeded <glob.h>.
This is no longer used, and also it is not available on Android and thus
breaks cross-compilation for Android.

Thanks Marcus Comstedt <marcus@mc.pp.se> for reporting.
2013-08-30 16:35:56 +02:00
Uwe Hermann 2a052cc4d6 Use consistent naming for internal libtool helper libs.
This now also matches what the 'new-driver' tool generates.
2013-05-10 17:44:01 +02:00
Uwe Hermann 29a27196a1 s/DRIVER_LOG_DOMAIN/LOG_PREFIX/.
This is more correct anyway, and also a bit shorter and more readable.
2013-05-03 21:59:32 +02:00
Uwe Hermann 2451a20ff5 fs9721: Factor out common code from serial-dmm.
These functions are FS9721 specific (and DMM specific), and can be used
from various drivers (e.g. serial-dmm or uni-t-dmm or possibly others).
2013-05-01 02:16:55 +02:00
Uwe Hermann 4853559466 uni-t-dmm/serial-dmm: Handle Voltcraft VC-840 temperature. 2013-05-01 01:58:42 +02:00
Uwe Hermann ad00a54da6 fs9922: Fix beep mode. 2013-05-01 01:02:46 +02:00
Uwe Hermann 649a4cd672 fs9922: Fix diode mode parsing. 2013-05-01 01:00:54 +02:00
Uwe Hermann 7381251e33 common/dmm: Drop obsolete *is_packet_start() functions. 2013-04-26 20:05:44 +02:00
Uwe Hermann 913abe8321 fs9922: Use common DMM API.
Use the same functions and structs as the other DMM protocol parsers
in hardware/common/dmm. Among other things, this allows the functions
to be used from drivers in a generic way, e.g. in serial-dmm, uni-t-dmm,
and possibly other drivers.
2013-04-26 20:05:44 +02:00
Uwe Hermann 50985c2019 GPL headers: Use correct project name. 2013-04-23 22:24:30 +02:00
Bert Vermeulen 1eb0a0df66 usb: Fix bus.address format detection 2013-04-15 23:47:04 +02:00
Uwe Hermann 3fd1d0ee1c configure.ac: Improve USB/EZUSB/serial checks.
- If libusb-1.0 is not found, do not compile in ezusb.c and usb.c since
   they require libusb.h. The respective hardware drivers that use
   libusb-1.0, and usb.c and/or ezusb.c will be excluded from the build
   elsewhere in configure.ac. Rename NEED_EZUSB to NEED_USB.

 - Drop the NEED_SERIAL check and always compile in serial.c. This is a
   very small chunk of code, it does not depend on any external
   libraries that might be missing, and it compiles on all architectures.
   Thus there's no need to conditionally include or exclude it.
2013-04-09 17:49:13 +02:00
Bert Vermeulen 3f98bf7017 Fix kernel driver attached check
The check is really only broken on darwin, but useful on all other
platforms, even if only Linux can actually detach a driver.
2013-04-07 14:14:16 +02:00
Uwe Hermann cc840ab618 serial.c: FreeBSD and OpenBSD don't have OFILL either. 2013-03-17 15:07:50 +01:00
Uwe Hermann 7d4abe5a77 serial.c: NetBSD doesn't have OFILL. 2013-01-27 01:23:01 +01:00
Bert Vermeulen b1a051544d serial: more serial processing flags to turn off 2013-01-23 02:32:58 +01:00
Bert Vermeulen 1953564a96 Rename SR_HWOPT_* and SR_HWCAP_* to SR_CONF_* 2013-01-21 23:32:50 +01:00
Bert Vermeulen d8e3685c47 free USB config descriptor after use 2013-01-21 23:32:49 +01:00
Uwe Hermann 86c02e6554 serial.c: Fix copy-paste error.
Thanks Bert Vermeulen for reporting.
2013-01-21 01:47:30 +01:00
Uwe Hermann b97cbca6c9 serial.c: OpenBSD doesn't have B460800. 2013-01-19 15:55:22 +01:00
lelazary 26ddb5baca Added flow control to serial configuration to support xon/xoff for link-mso19 2013-01-08 01:00:13 +01:00
Uwe Hermann fe0c0b98c6 Add Cyrustek ES51922 DMM chip parser. 2013-01-03 01:13:06 +01:00
Alexandru Gagniuc cbc8cbd8bb rs9lcd: Add missing 'break;'
A break was missing for "case MODE_AMP_WIDTH:" in sr_rs9lcd_parse().

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-12-31 22:26:43 +01:00
Uwe Hermann 6e9d545cf4 rs9lcd: Fix compiler warning.
rs9lcd.c:289:19: warning: 'rawval' may be used uninitialized in this
function [-Wmaybe-uninitialized]
2012-12-31 20:58:14 +01:00
Bert Vermeulen 9116262931 add USBTMC device search helper 2012-12-30 01:44:58 +01:00
Alexandru Gagniuc 47eda193b2 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 <mr.nuke.me@gmail.com>
2012-12-25 23:43:30 +01:00
Alexandru Gagniuc 0853d5e627 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 <mr.nuke.me@gmail.com>
2012-12-25 23:43:02 +01:00
Bert Vermeulen d92faf6cac serial: more debug cleanup 2012-12-24 11:22:01 +01:00
Bert Vermeulen 49aaa0bc68 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.
2012-12-24 11:22:01 +01:00
Uwe Hermann 006dbe5587 serial_stream_detect(): Drop unneeded sr_spew(). 2012-12-17 14:21:12 +01:00
Bert Vermeulen c5f1a021b8 usb: strip overly verbose debugging 2012-12-15 04:07:25 +01:00
Bert Vermeulen e7f378fd1a usb: strip useless code 2012-12-15 04:07:25 +01:00
Peter Stuge 1740429d70 hardware: A few further USB error message fixups 2012-12-05 01:34:15 +01:00
Peter Stuge d4928d7102 hardware: Call libusb_error_name() in all USB-related error messages 2012-12-05 01:14:44 +01:00
Bert Vermeulen 7ae6a75826 usb: sr_usb_find() uses standardized connection string to find a USB device 2012-12-04 23:25:11 +01:00
Alexandru Gagniuc d458a0ac29 ezusb: Use DRIVER_LOG_DOMAIN for debug output
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-12-04 13:31:49 -06:00
Alexandru Gagniuc ea088bb693 serial.c: Be more verbose about failing to parse parameter string
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-12-02 22:22:07 +01:00
Alexandru Gagniuc 21829e6708 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 <mr.nuke.me@gmail.com>
2012-12-02 22:22:07 +01:00
Alexandru Gagniuc 05f134abc2 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 <mr.nuke.me@gmail.com>
2012-12-02 22:18:22 +01:00
Uwe Hermann 9871215c83 metex14: Add dB mode and hFE mode support.
This is found e.g. on the Metex M-3640D DMM.
2012-12-02 14:22:51 +01:00
Uwe Hermann e90cf076aa metex14: Add sr_metex14_packet_request(). 2012-12-02 14:21:18 +01:00
Uwe Hermann 8f46911e42 metex14: Fix 'is_ol' handling.
Thanks to Bert Vermeulen for the reminder.
2012-12-02 14:21:18 +01:00
Alexandru Gagniuc 2477fb9569 metex14: Parse microamp (uA) values.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-12-02 14:21:18 +01:00