Add downsample and skip parameters to input/vcd.
Improve compatibility with various kinds of VCD files.
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>
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>
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>
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>
Add compress option to input/vcd.
serial: Initial code for setting DTR/RTS.

Currently disabled until option parsing is in place.
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.
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>
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>
serial: Fix Windows build.
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().
serial: RTS/DTR support on Windows/MinGW.
serial: Full baudrate support on Windows/MinGW.
serial: Don't hardcode parity and stop bits on Windows.
tekpower-dmm: Drop unneeded g_try_malloc().
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.
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.
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.