Commit Graph

1110 Commits

Author SHA1 Message Date
Peter Stuge 73496bb571 alsa: Remove unused and unprovided hw_init() parameter `devname' 2012-12-03 12:07:40 +01:00
Bert Vermeulen 46697e38b2 lascar-el-usb: Initial driver skeleton. 2012-12-03 03:53:44 +01:00
Uwe Hermann 162b735218 Remove some radioshack-dmm leftovers. 2012-12-02 22:22:07 +01: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
Alexandru Gagniuc ae95ffebfa 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 <mr.nuke.me@gmail.com>
2012-12-02 21:48:17 +01:00
Alexandru Gagniuc d5ce233fe1 serial-dmm: Add RadioShack 22-168 support.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-12-02 17:38:05 +01:00
Uwe Hermann eebb606762 demo: Add missing dev_clear() API call. 2012-12-02 17:21:13 +01:00
Uwe Hermann 55a6daf59f 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.
2012-12-02 17:14:45 +01:00
Uwe Hermann 3a18cf625e serial-dmm: Drop accidentally committed file. 2012-12-02 16:11:42 +01:00
Uwe Hermann 7f64e88fa9 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.
2012-12-02 16:09:31 +01:00
Alexandru Gagniuc 3b20367381 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 <mr.nuke.me@gmail.com>
2012-12-02 16:08:03 +01:00
Uwe Hermann d4bd66a0c7 serial-dmm: Add PCE PCE-DM32 support. 2012-12-02 14:28:29 +01:00
Uwe Hermann a376ffea49 serial-dmm: Add PeakTech 4370 support. 2012-12-02 14:22:51 +01:00
Uwe Hermann a53da08254 serial-dmm: Add Metex M-3640D support. 2012-12-02 14:22:51 +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 6dca2f16ee serial-dmm: Add V&A VA18B support. 2012-12-02 14:22:51 +01:00
Uwe Hermann 5887c9cc1a serial-dmm: Add MASTECH MAS345 support. 2012-12-02 14:22:51 +01:00
Uwe Hermann f0ac4929d3 serial-dmm: Add PeakTech 3410 support. 2012-12-02 14:22:51 +01:00
Uwe Hermann ce3777ada9 serial-dmm: Add Metex ME-31 support. 2012-12-02 14:22:46 +01:00
Uwe Hermann f086b83011 serial-dmm: Add Digitek DT4000ZC support. 2012-12-02 14:21:19 +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
Alexandru Gagniuc 3ebc9b59a2 metex14: Fix parsing of measurement flags.
strcmp(buf + 9, "  mA") does not work because buf is CR-terminated,
while "  mA" is NUL-terminated.

Drop ambiguities arising from the termination of the strings, and
only compare the characters we care about, using strncmp().

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-12-02 14:21:18 +01:00
Alexandru Gagniuc e82d7dbc20 metex14: Print contents of received packet.
The packet is an ASCII string. We can simply print the raw packet data.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-12-02 14:21:18 +01:00
Alexandru Gagniuc 76b55dfa8a metex14: Fix parsing of spaces.
When the parser found a space, it treated it as an invalid digit
and discarded the whole packet. This behavior was incorrect on
2000 count devices, where the first digit can be sent as a space
rather than a '0'.

Convert spaces to '0' and parse them as usual.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-12-02 14:21:18 +01:00
Uwe Hermann 21a7f2692e Rename tekpower-dmm to serial-dmm.
This is now a generic driver for multiple DMM "subdrivers" that use simple
serial port protocols.
2012-12-02 14:21:18 +01:00
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