Commit Graph

1081 Commits

Author SHA1 Message Date
Uwe Hermann 729b01f988 tekpower-dmm: Generalize & first-class TP4000ZC driver.
Prepare the tekpower-dmm driver to be able to support various simple
serial port based DMMs.

Also, make a 'tekpower-tp4000zc' "first-class" driver which is currently
the only user of this generic driver.
2012-12-02 14:21:18 +01:00
Uwe Hermann 1fbab46626 metex14: Pass 'info' as a void pointer.
This is done so that the function prototype of all sr_*_parse() DMM
functions is the same, which will be needed later.
2012-12-02 14:21:17 +01:00
Uwe Hermann 93357bc3ce fs9721: Pass 'info' as a void pointer.
This is done so that the function prototype of all sr_*_parse() DMM
functions is the same, which will be needed later.
2012-12-02 14:21:17 +01:00
Uwe Hermann d84fc9cb3b tekpower-dmm: Drop unneeded g_try_malloc(). 2012-12-02 14:21:17 +01:00
Uwe Hermann 5ddb0cc7d4 serial: Don't hardcode parity and stop bits on Windows. 2012-12-02 14:10:27 +01:00
Uwe Hermann 5ae35c29a7 serial: Full baudrate support on Windows/MinGW. 2012-12-02 13:56:13 +01:00
Uwe Hermann 39e5d79826 serial: RTS/DTR support on Windows/MinGW. 2012-12-02 13:41:49 +01:00
Uwe Hermann a54dd31e38 serial: Use OS-independent flags for serial port opening.
Add SERIAL_RDWR, SERIAL_RDONLY, and SERIAL_NONBLOCK (for now), which are
mapped to the respective OS-specific mechanism in serial_open().
2012-12-02 12:45:54 +01:00
Uwe Hermann 0f84cda05d serial: Fix Windows build. 2012-12-01 22:34:53 +01:00
Alexandru Gagniuc c216d62307 demo: Properly stop acquisition after reaching our sample quota
The demo driver was using sr_session_source_add_channel() to add
a poll source, but was relying on sr_session_run_poll() to call
sr_session_source_remove(). This, coupled with the design of the
driver caused errors once the samples were collected.

The error stream was most likely related to failing to properly close
one of the channels.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-12-01 22:00:16 +01:00
Alexandru Gagniuc 49145a63c7 demo: Be more verbose about starting/stopping acquisition
This is the first step in fixing the demo driver: figuring out what is
being called and what is not _and_ have it show up in the logs.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-12-01 22:00:15 +01:00
Bert Vermeulen 71caaad46b serial: allow for extra rts and dtr options in conn string
Options in addition to the usual "9600/8n1" syntax start with a
slash, and take the form of key=value, where different options are
also separated by slashes. For example:

	"9600/8n1/rts=0/dtr=1"

This sets RTS low and DTR high.
2012-11-27 00:55:08 +01:00
Uwe Hermann 700dcd5caa serial: Initial code for setting DTR/RTS.
Currently disabled until option parsing is in place.
2012-11-26 17:01:15 +01:00
Petteri Aimonen 6b7ace4832 Add compress option to input/vcd. 2012-11-22 23:15:37 +01:00
Alexandru Gagniuc 9047358761 radioshack-dmm: Be more verbose with packet checks
Add sr_spew() messages to state why the packet was found to be invalid.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-11-21 19:33:55 -06:00
Alexandru Gagniuc 2ecc5d432f radioshack-dmm: Check for valid mode before calculating checksum
The packet mode byte is akin to a signature. If that is invalid, there's
no point in calculating the checksum, so check the mode first.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-11-21 19:30:26 -06:00
Alexandru Gagniuc 54be7c005e radioshack-dmm: Improve serial detection
For device detection, use serial_stream_detect() instead of
serial_readline() + custom logic.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-11-21 19:19:58 -06:00
Alexandru Gagniuc 551c3d8ce3 serial.c: Sanitize serial_stream_detect
Print the timeout in miliseconds, not microseconds.
Only calculate elapsed time once oer loop.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-11-21 19:18:21 -06:00
Petteri Aimonen 8be8746951 Improve compatibility with various kinds of VCD files. 2012-11-21 16:39:16 +01:00
Petteri Aimonen 0157808d74 Add downsample and skip parameters to input/vcd. 2012-11-21 16:39:16 +01:00
Petteri Aimonen 61a429c963 VCD data parsing 2012-11-20 22:24:17 +02:00
Petteri Aimonen 99eaa20695 Beginnings of VCD input module.
File header parsing implemented.
Data parsing not yet implemented.
2012-11-20 21:03:06 +02:00
Petteri Aimonen 8c012adbc1 Add support for fs and ps to sr_parse_period.
These time units are used in VCD files.
2012-11-20 21:02:14 +02:00
Uwe Hermann ac913e5c35 Add Metex 14-byte ASCII protocol parser. 2012-11-17 22:27:54 +01:00
Bert Vermeulen 90165efe55 ols: if no serial port specified, this driver is not used. 2012-11-16 15:26:47 +01:00
Uwe Hermann 766456be1c Move serial_stream_detect() to serial.c. 2012-11-14 18:40:07 +01:00
Uwe Hermann e42b82a66f configure.ac: Update NEED_SERIAL list. 2012-11-14 18:29:27 +01:00
Uwe Hermann 4da1a800df serial: Compile-fix for Windows/MinGW. 2012-11-14 18:20:13 +01:00
Uwe Hermann 6bef68a7e1 tekpower-dmm: Cosmetics. 2012-11-14 18:13:56 +01:00
Alexandru Gagniuc 2546b05c80 tekpower-dmm: Improve serial detection.
Serial detection was using serial_readline, which stripped carriage
return from the packets. This made for a very unreliable detection
mechanism.

Switch to a timeout-based detection mechanism that parses the data
as it comes in. This also allows us to stop parsing once we found
our first valid packet.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-11-14 18:13:56 +01:00
Uwe Hermann bda8fc98b1 Drop obsolete genericdmm driver. 2012-11-14 15:26:11 +01:00
Bert Vermeulen d35afa87c9 tekpower-dmm: use new serial API 2012-11-12 12:50:42 +01:00
Bert Vermeulen 401476daaf radioshack-dmm: use new serial API 2012-11-12 12:41:10 +01:00
Bert Vermeulen 19ee7dff78 tondaj-sl-814: use new serial API 2012-11-12 03:00:32 +01:00
Bert Vermeulen f306ca61f6 colead-slm: use new serial API 2012-11-12 02:54:10 +01:00
Bert Vermeulen 109a3ba413 agilent-dmm: use new serial API 2012-11-12 02:25:37 +01:00
Bert Vermeulen 58d03f034f fluke-dmm: use new serial API 2012-11-12 02:25:17 +01:00
Bert Vermeulen 530f201eb8 ols: use new serial API 2012-11-12 02:24:47 +01:00
Bert Vermeulen 299bdb249e serial: revamp internal API
The only thing to get passed around now is the struct sr_serial_dev_inst
pointer. This should make things more portable as well.
2012-11-12 00:27:17 +01:00
Uwe Hermann de6e0eca95 sigma/la8/demo: s/SR_PROBE_ANALOG/SR_PROBE_LOGIC/. 2012-11-11 19:40:14 +01:00
Uwe Hermann 472bbb464b alsa: Use message logging helpers. 2012-11-11 18:14:17 +01:00
Uwe Hermann a0a23863da output/gnuplot: Drop obsolete code. 2012-11-11 18:14:17 +01:00
Uwe Hermann 121c18854a contrib/Makefile.am: Add missing files. 2012-11-11 18:14:17 +01:00
Uwe Hermann a885ce3ee9 Various subsystems: Use message logging helpers. 2012-11-11 18:14:17 +01:00
Uwe Hermann a944a84b17 Output modules: Use message logging helpers. 2012-11-11 18:14:17 +01:00
Uwe Hermann 8e7f1cfd99 Input modules: Use message logging helpers. 2012-11-11 18:14:17 +01:00
Uwe Hermann 64d33dc28e All drivers: Drop unneeded comments. 2012-11-11 18:09:11 +01:00
Uwe Hermann fa7730623a victor-dmm: Cosmetics. 2012-11-11 18:09:11 +01:00
Bert Vermeulen 5df7b20156 serial: avoid Cyrillic conversion specifiers 2012-11-11 03:27:51 +01:00
Bert Vermeulen fe1c50fba6 ols: fix device discovery 2012-11-11 03:12:10 +01:00