Commit Graph

1185 Commits

Author SHA1 Message Date
Martin Ling 0d4405ce5e Update for renamed libserialport header file. 2013-11-14 23:48:16 +01:00
Martin Ling c9bc57b6bc Update to new libserialport API. 2013-11-14 23:48:16 +01:00
Martin Ling a9bce5a561 Use libserialport for serial port access. 2013-11-14 23:48:16 +01:00
Bert Vermeulen 58f4336963 rigol-ds1xx2: Unbreak listing of _VDIV and _COUPLING 2013-11-08 01:03:19 +01:00
Bert Vermeulen 5f77dffc02 rigol-ds1xx2: Unbreak listing of SR_CONF_DEVICE_OPTIONS 2013-11-08 01:03:19 +01:00
Bert Vermeulen be60a9e4a9 rigol-ds1xx2: Better error reporting when probe groups are required 2013-11-08 01:03:19 +01:00
Bert Vermeulen 78bcc55afa rigol-ds1xx2: Minor coding style fixes 2013-11-08 01:03:19 +01:00
Bert Vermeulen d3c74a6fb0 probe_groups: API changes required to implement probe groups. 2013-11-08 01:03:18 +01:00
Bert Vermeulen ba358ffd83 rigol-ds1xx2: fix bitrot in device cleanup code 2013-11-08 01:03:18 +01:00
Bert Vermeulen e43fdd8d4f rigol-ds1xx2: Don't assume valid sdi 2013-11-08 01:03:18 +01:00
Bert Vermeulen 45311368de rigol-ds1xx2: Skip obsolete fields 2013-11-08 01:03:18 +01:00
Martin Ling f48e0249b4 rigol-ds1xx2: implement probe group specific options. 2013-11-08 01:03:17 +01:00
Martin Ling 3d3a601e80 rigol-ds1xx2: create probe groups. 2013-11-08 01:03:17 +01:00
Martin Ling 8f996b8948 probe_groups: API changes required to implement probe groups. 2013-11-08 01:03:16 +01:00
Dan Horák b775d753e3 rigol-ds1xx2: detect Rigol DS1xx2 with upgraded bandwith
The bandwith in Rigol DS1xx2D/E scopes can be upgraded to 150 MHz in software.
So detect also scopes with the upgraded bandwith.

using libsigrok-0.2.1 + this change + commit da970d24ec (required for newer kernels):

[dan@eagle sigrok]$ sigrok-cli --scan -d rigol-ds1xx2 -l 5
sr: libsigrok loglevel set to 5.
sr: Sanity-checking all drivers.
sr: Sanity-checking all input modules.
sr: Sanity-checking all output modules.
srd: libsigrokdecode loglevel set to 5.
sr: hwdriver: Initializing driver 'rigol-ds1xx2'.
sr: serial: Opening serial port '/dev/usbtmc0' (flags 1).
sr: serial: Opened serial port '/dev/usbtmc0' (fd 7).
sr: serial: Wrote 5/5 bytes (fd 7).
sr: serial: Closing serial port /dev/usbtmc0 (fd 7).
sr: rigol-ds1xx2: response: /dev/usbtmc0 [Rigol Technologies,DS1152D,DS1EU150XXXXXX,00.04.01.00.02]
sr: hwdriver: Scan of 'rigol-ds1xx2' found 1 devices.
The following devices were found:
rigol-ds1xx2 - Rigol Technologies DS1152D 00.04.01.00.02 with 18 probes: CH1 CH2 D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15
2013-11-03 14:20:47 +01:00
Uwe Hermann 3a8cad9137 metex14: Handle a few missing cases for overflow. 2013-10-31 13:47:30 +01:00
Uwe Hermann 88f544f27e Add support for the Metex M-4650CR.
(the Voltcraft M-4650CR is a rebadged Metex M-4650CR)
2013-10-30 14:44:44 +01:00
Uwe Hermann 2b83d7fee1 Add support for the Voltcraft M-4650CR. 2013-10-30 14:44:44 +01:00
Uwe Hermann e790bd5cda norma-dmm: Minor cosmetics, coding-style, consistency fixes.
Also, add a missing "%" in an sr_err() and a missing parameter in
another sr_err().
2013-10-25 21:25:26 +02:00
Matthias Heidbrink f8e76e2e74 norma dmm: Implemented driver. 2013-10-25 21:25:26 +02:00
Matthias Heidbrink bfd48770fc norma dmm: Initial driver skeleton. 2013-10-25 21:25:26 +02:00
Matthias Heidbrink 50a9aba21b serial: Removed flag OPOST (turn off all output processing). 2013-10-25 19:11:15 +02:00
Matthias Heidbrink a510d55571 serial: Added flags CLOCAL (ignore modem status lines) and CREAD (start receiver). 2013-10-25 19:11:15 +02:00
Matthias Heidbrink 1b943b6d8b serial: Added flag IXANY (any char will restart) to XON/XOFF handshaking. 2013-10-25 19:11:14 +02:00
Sean Young 0c30b35fce saleae-logic16: claim device before using it
The kernel warns:

[ 7461.925685] usb 2-4: usbfs: process 11303 (sigrok-cli) did not claim interface 0 before use
2013-10-24 16:01:46 +01:00
Aurelien Jacobs 5542bee61b teleinfo: actual parser implementation 2013-10-24 15:41:11 +01:00
Aurelien Jacobs 8e796cb438 teleinfo: Initial driver skeleton. 2013-10-24 15:41:11 +01:00
Uwe Hermann c02dc3e261 metex14: Add support for pF (picofarad).
This is used on some Metex DMMs.
2013-10-23 18:41:13 +02:00
Uwe Hermann ee6cb5a417 metex14: Use case-insensitive string compares.
This allows some other DMMs to be supported that use e.g. "kOhm" vs.
"KOhm", and so on.
2013-10-23 18:07:54 +02:00
Uwe Hermann 1a807c13fc metex14: Support DMMs with slightly different protocol.
This adds support for DMMs with 5 digits in the protocol (instead of 4)
and some more whitespace variants.
2013-10-23 18:06:15 +02:00
Uwe Hermann 71f1302b4b metex14: Support DMMs with whitespace differences.
Most Metex DMMs use e.g. "  mV" as unit field, others use "mV  ",
though. Support these (and other) whitespace variants by stripping all
spaces and only comparing non-space characters.
2013-10-23 17:31:14 +02:00
Matthias Heidbrink b21d7eebe2 serial: Changed order of flags PARENB and PARODD in deletion to same order as in setting (cosmetic). 2013-10-18 16:58:33 +02:00
Aurelien Jacobs df6b0f99af ISO-TECH IDM103N: remove the useless -ser postfix 2013-10-13 14:54:54 +02:00
Aurelien Jacobs 94e9021b3e es519xx: correct initialization of es519xx_info structure 2013-10-13 14:54:54 +02:00
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 de737bfc11 add ISO-TECH IDM103N serial-dmm driver 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
Uwe Hermann 2f9376117c fx2lafw: Organize driver into api.c / protocol.[ch].
This now matches the naming conventions of the other drivers.
2013-10-06 22:28:45 +02:00
Daniel Thompson fbf07e0209 agilent-dmm: Fix SEGV during incomplete reply from meter.
If buf contains exactly the string "Agilent Technologies" (for example if
there are bugs in the timeout logic or serial driver causing the reply from
the meter to be abridged) then this code will SEGV. This is because tokens[1]
is NULL but only tokens[2] and tokens[3] (both of which are undefined) are
NULL checked.

Can be trivially corrected by NULL checking tokens[1] as well.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2013-10-04 13:30:49 +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 45c0841b25 uni-t-ut32x: Shorten dev_list(). 2013-09-25 14:26:35 +02:00
Matt Ranostay 6ebe003985 ols: fixed demux mode disable noise filter
Demux flag wasn't getting set off if one non-demux sample was ran
beforehand.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-09-07 20:17:16 +02:00
Matt Ranostay 6a53bde671 ols: Moved FLAG_FILTER to demux check
Demux mode was having filter mode set which it doesn't
support per FPGA demon core docs.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-09-06 11:42:25 +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
Matt Ranostay b1de040700 ols: fixed channel limit check
For demux mode we half the channels. Previous check method broke
the OLS randomly and but it in a bad state.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-08-30 13:58:36 +02:00
Bert Vermeulen da970d24ec rigol-ds1xx2: newer Linux kernels have USBTMC in /sys/class/usbmisc 2013-08-30 13:57:45 +02:00
Matt Ranostay f51acd69d7 ols: combine demux samples
demux mode allows DDR sampling which disables group 2 & 3
and thus samples group 0 & 1 to sample on rising and falling of
the clock.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-08-28 10:21:59 +02:00
Matt Ranostay 7b0a57fd1c ols: add swap channels feature
Allow channel groups to be swapped. This is useful
for demux at 200mhz with the unbuffered channels.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-08-28 10:21:59 +02:00
Matt Ranostay de52409982 ols: Display noise filter flag
Show if noise filter is on. This is important to be
sure is off for demux mode.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-08-28 10:21:59 +02:00
Bert Vermeulen 00d04d3b0e ols: Fix RLE count handling
The high bit of the sample, denoting this is a count, was not getting
properly cleared. This resulted in an inevitably negative count, and
corruption of the sample buffer before it was transferred to the
frontend.
2013-08-27 00:33:20 +02:00
Bert Vermeulen abb39e6b8c ols: Properly initialize entire single-sample buffer before start
The single sample buffer, up to 4 bytes long, was not getting initialized
on (every) acquisition start, only after the first full sample was in.
This caused the first sample to potentially hold garbage.
2013-08-26 23:42:09 +02:00
Matt Ranostay eb1b610b12 ols: add external clock support
Add external clock support that allows you to use the tracing
targets bus clock line for sampling.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-08-26 10:28:45 +02:00
Matt Ranostay 967760a893 ols: add test mode support
ols allows both external and internal test patterns at ~20khz
which are helpful for unit tests and demos.

pattern=internal -> route pattern internally to all 32 pins
                      (input otherwise disabled)

pattern=external -> generates pattern on unbuffered pins 16:31
                      (which can be looped back to the buffered pins 0:15)

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-08-26 09:52:24 +02:00
Matt Ranostay 503133bb5f ols: fixed parallel stage triggers
Stage count was always getting incremented one more than
actual stages, and this caused a extra stage with zero'ed data
probe lines to have the start bit field.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-08-26 09:48:41 +02:00
Uwe Hermann d0107565c1 saleae-logic16: Drop unneeded NUM_PROBES. 2013-08-21 11:41:21 +02:00
Uwe Hermann 87b537ced0 saleae-logic16: Shorten dev_list() implementation. 2013-08-21 11:37:40 +02:00
Uwe Hermann 96484e22b4 saleae-logic16: Whitespace fixes, cosmetics. 2013-08-21 11:33:37 +02:00
Marcus Comstedt 186dde8d72 saleae-logic16: Cleanup the prime_fpga function
The driver should now work on any Logic16.
2013-08-20 19:55:57 +02:00
Marcus Comstedt fec7aa6a44 saleae-logic16: Update copyright blurbs.
Copied copyright lines from fx2lafw driver, since much of the code is
taken from there.
2013-08-20 19:55:57 +02:00
Marcus Comstedt db11d7d2d0 saleae-logic16: Add voltage threshold conf. 2013-08-20 19:55:57 +02:00
Marcus Comstedt b117363ad7 saleae-logic16: Declare confs. 2013-08-20 19:55:57 +02:00
Marcus Comstedt 7b5daad45c saleae-logic16: Implemented acquisition. 2013-08-20 19:55:57 +02:00
Marcus Comstedt 15abcf0f58 saleae-logic16: Initialize the FPGA.
The map_eeprom_data function is currently unknown.  The map entries
provided were observed via bus-snooping of the vendor software on my
device.  Other devices may need additional values.
2013-08-20 19:55:57 +02:00
Marcus Comstedt 5eea4305ad saleae-logic16: Reworked scan/open to handle FW upload.
The new code is based on code from the fx2lafw driver.
2013-08-20 19:55:57 +02:00
Marcus Comstedt f6a21fa50c saleae-logic16: Detect the hardware. 2013-08-20 19:55:57 +02:00
Marcus Comstedt c463dcf06c saleae-logic16: Initial driver skeleton. 2013-08-20 19:55:22 +02:00
Bert Vermeulen 56e76981bc uni-t-dmm: Require conn parameter for scan
Since the uni-t-ut32x series handles devices with the same USB VID.PID,
which is linked to the WCH CH9325 USB/HID-UART interface chip, this
driver can no longer assume it can handle anything with this VID.PID.
2013-08-11 10:52:43 +02:00
Bert Vermeulen d6ff054ae5 uni-t-ut32x: Full acquisition support 2013-08-11 10:46:36 +02:00
Bert Vermeulen 6513f97fbe uni-t-ut32x: Flesh out driver 2013-08-11 10:46:36 +02:00
Bert Vermeulen 3877dde43a uni-t-ut32x: Initial driver skeleton. 2013-08-11 10:46:36 +02:00
Uwe Hermann 4a8bbed76d center-3xx: Initial Center 309 / Voltcraft K204 support. 2013-08-08 19:59:49 +02:00
Uwe Hermann 4433145f48 center-3xx: Initial driver skeleton. 2013-08-08 19:58:48 +02:00
Uwe Hermann ce95428cca Consistent use of "IKALOGIC" spelling.
The company name is written all-caps pretty consistently on the
vendor website and docs, so use that spelling everywhere.
2013-08-07 16:21:57 +02:00
Uwe Hermann b07b42f319 Cosmetics, typos. 2013-08-07 16:21:57 +02:00
Uwe Hermann e11a1ebacc alsa: Fix double-free issue.
This fixes bug #129.
2013-08-07 16:21:56 +02:00
Uwe Hermann 4d7ddff75b uni-t-dmm: Fix UT61E bug related to the UNI-T UD-D04 cable.
This fixes bug #136.
2013-08-06 23:36:16 +02:00
Uwe Hermann c51bbdec34 Drop nexus-osciprime skeleton for now.
This is mostly just a skeleton driver framework at the moment, we'll
bring it back when the driver is fully implemented.
2013-08-05 12:59:23 +02:00
Uwe Hermann c93ebace30 uni-t-dmm: Drop DMM table (comment).
This info is in the wiki already, no need to duplicate in the code.
2013-08-02 01:02:03 +02:00
Bert Vermeulen faf720246a ols: Workaround for mac os X stray events 2013-08-01 19:48:07 +02:00
Uwe Hermann ce4d26ddf9 Various cosmetics, whitespace, consistency fixes. 2013-07-31 13:09:48 +02:00
Uwe Hermann 2b691be806 serial-dmm/uni-t-dmm: Drop Tecpel DMM-8060.
The Tecpel DMM-8060 was added since we assumed it would be a rebadged
Voltcraft VC-820 (since we know the Tecpel DMM-8061 is a rebadged VC-840).

However, according to the vendor webpage it doesn't have PC connectivity
at all, so drop it for now (until someone can confirm that it does or does
not actually have RS232/USB connectivity).
2013-07-18 12:43:07 +02:00
Bert Vermeulen e84e0096db Fix build 2013-07-16 17:18:20 +02:00
Bert Vermeulen b979d0c9cb kecheng-kc-330b: Code cleanup 2013-07-16 17:17:54 +02:00
Bert Vermeulen d406dccd6a lascar-el-usb: Don't close device after acquisition 2013-07-16 16:08:38 +02:00
Bert Vermeulen 85ed4ab3ba kecheng-kc-330b: Acquisition from stored logs 2013-07-16 16:08:38 +02:00
Bert Vermeulen f336618c3d kecheng-kc-330b: Check device status before acquisition
Can't really count on it either way though, the device is just
too flaky to conclude whether it's going to work or not, regardless
of the status returned.
2013-07-16 16:08:38 +02:00
Bert Vermeulen df03552894 kecheng-kc-330b: Live SPL acquisition 2013-07-16 16:08:38 +02:00
Bert Vermeulen bc7be4a9f4 kecheng-kc-330b: Implement all SR_CONF options 2013-07-16 16:08:38 +02:00
Bert Vermeulen a8806f032c kecheng-kc-330b: Flesh out driver, add scan functionality 2013-07-16 16:08:38 +02:00
Bert Vermeulen ed759a0835 kecheng-kc-330b: Initial driver skeleton. 2013-07-16 16:08:38 +02:00
Uwe Hermann ab4bb6eb7c ikalogic-scanaplus: Initial driver implementation. 2013-07-16 01:01:11 +02:00
Uwe Hermann fdf4a1f5a0 ikalogic-scanaplus: Initial driver skeleton. 2013-07-15 12:20:53 +02:00
Florian Knodt a7a163a795 Support for UNI-T UT60A/E multimeters via RS232 or USB 2013-07-09 22:57:55 +02:00
Marc Schink fb8d593cfe Use GET_REPORT request for device to host transfer. 2013-07-05 14:01:06 +02:00
Uwe Hermann c134574938 uni-t-dmm: Add support for the Voltcraft VC-830. 2013-06-23 10:23:21 +02:00
Uwe Hermann 6045b91aa4 serial-dmm: Add support for the Voltcraft VC-830. 2013-06-23 10:23:21 +02:00