serial: Compile-fix for Windows/MinGW.
configure.ac: Update NEED_SERIAL list.
Move serial_stream_detect() to serial.c.
ols: if no serial port specified, this driver is not used.
Add Metex 14-byte ASCII protocol parser.
Add support for fs and ps to sr_parse_period.

These time units are used in VCD files.
Beginnings of VCD input module.

File header parsing implemented.
Data parsing not yet implemented.
VCD data parsing
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.