]> sigrok.org Git - libsigrok.git/log
libsigrok.git
10 years agoatten-pps3xxx: Use serial_timeout().
Bert Vermeulen [Mon, 6 Oct 2014 10:12:13 +0000 (12:12 +0200)]
atten-pps3xxx: Use serial_timeout().

10 years agoserial: Add serial_timeout().
Bert Vermeulen [Mon, 6 Oct 2014 10:10:25 +0000 (12:10 +0200)]
serial: Add serial_timeout().

This calculates a proper timeout value for blocking writes on the
given serial port, for the given number of bytes. Timeout is based
on a fixed 10ms OS overhead, baud rate, data bits and stop bits.

10 years agoatten-pps3xxx: Fix serial port timeout.
Bert Vermeulen [Sun, 5 Oct 2014 10:29:28 +0000 (12:29 +0200)]
atten-pps3xxx: Fix serial port timeout.

10 years agofluke-dmm: Fix blocking serial write timeout.
Bert Vermeulen [Sat, 4 Oct 2014 08:37:07 +0000 (10:37 +0200)]
fluke-dmm: Fix blocking serial write timeout.

10 years agoagilent-dmm: Fix blocking serial write timeout.
Bert Vermeulen [Sat, 4 Oct 2014 00:30:27 +0000 (02:30 +0200)]
agilent-dmm: Fix blocking serial write timeout.

10 years agoinput/csv: Fix size_t printing.
Bert Vermeulen [Sat, 4 Oct 2014 00:24:41 +0000 (02:24 +0200)]
input/csv: Fix size_t printing.

10 years agounit tests: Fix build due to recent changes.
Uwe Hermann [Fri, 3 Oct 2014 18:11:47 +0000 (20:11 +0200)]
unit tests: Fix build due to recent changes.

10 years agoAdd a configurable read timeout to blocking SCPI reads, default 1s.
Martin Ling [Sun, 28 Sep 2014 13:30:20 +0000 (14:30 +0100)]
Add a configurable read timeout to blocking SCPI reads, default 1s.

10 years agoAdd some Agilent USBTMC PIDs.
Bert Vermeulen [Fri, 3 Oct 2014 11:39:06 +0000 (13:39 +0200)]
Add some Agilent USBTMC PIDs.

10 years agoAdd a timeout parameter to blocking serial calls.
Martin Ling [Sun, 28 Sep 2014 12:05:33 +0000 (13:05 +0100)]
Add a timeout parameter to blocking serial calls.

Set this new parameter to 0 (no timeout) at every call site. This is
consistent with previous behaviour, so cannot cause any regressions.

Waiting forever for a serial operation is clearly always wrong. Without
specific knowledge of each device and driver however, I can't choose
appropriate timeouts for each call. The maintainers of these drivers
will need to do so, and also add appropriate handling of timeouts.

When this commit is merged, a bug should be entered for each driver
that is touched by it.

10 years agoAvoid serial_write_blocking() warnings.
Bert Vermeulen [Thu, 2 Oct 2014 14:01:27 +0000 (16:01 +0200)]
Avoid serial_write_blocking() warnings.

10 years agoFix similar broken error handling on several serial calls.
Martin Ling [Sun, 28 Sep 2014 11:54:56 +0000 (12:54 +0100)]
Fix similar broken error handling on several serial calls.

10 years agokecheng-kc-330b: Fix missing time/frequency weighting.
Bert Vermeulen [Thu, 2 Oct 2014 13:06:36 +0000 (15:06 +0200)]
kecheng-kc-330b: Fix missing time/frequency weighting.

10 years agohantek-dso: Code cleanup.
Bert Vermeulen [Thu, 2 Oct 2014 13:03:18 +0000 (15:03 +0200)]
hantek-dso: Code cleanup.

This cleans up a warning generated by clang's static analyzer.

10 years agodemo: Code cleanup.
Bert Vermeulen [Thu, 2 Oct 2014 13:02:14 +0000 (15:02 +0200)]
demo: Code cleanup.

This cleans up a warning generated by clang's static analyzer.

10 years agofluke-dmm: Code cleanup.
Bert Vermeulen [Thu, 2 Oct 2014 13:00:37 +0000 (15:00 +0200)]
fluke-dmm: Code cleanup.

This cleans up a warning generated by clang's static analyzer.

10 years agochronovu-la8: Code cleanup.
Bert Vermeulen [Thu, 2 Oct 2014 12:58:57 +0000 (14:58 +0200)]
chronovu-la8: Code cleanup.

This cleans up a warning generated by clang's static analyzer.

10 years agoasix-sigma: Trigger code cleanup.
Bert Vermeulen [Thu, 2 Oct 2014 12:53:20 +0000 (14:53 +0200)]
asix-sigma: Trigger code cleanup.

This cleans up a warning generated by clang's static analyzer.

10 years agoagilent-dmm: Code cleanup.
Bert Vermeulen [Thu, 2 Oct 2014 12:11:35 +0000 (14:11 +0200)]
agilent-dmm: Code cleanup.

This cleans up a warning generated by clang's static analyzer.

10 years agoscpi/vxc: Avoid NULL dereference.
Bert Vermeulen [Thu, 2 Oct 2014 12:07:31 +0000 (14:07 +0200)]
scpi/vxc: Avoid NULL dereference.

This cleans up a warning generated by clang's static analyzer.

10 years agoinput/csv: Code cleanup.
Bert Vermeulen [Thu, 2 Oct 2014 11:59:44 +0000 (13:59 +0200)]
input/csv: Code cleanup.

This cleans up a warning generated by clang's static analyzer.

10 years agoinput/chronovu_la8: Code cleanup.
Bert Vermeulen [Thu, 2 Oct 2014 11:55:37 +0000 (13:55 +0200)]
input/chronovu_la8: Code cleanup.

This cleans up a warning generated by clang's static analyzer.

10 years agoinput/binary: Code cleanup.
Bert Vermeulen [Thu, 2 Oct 2014 11:55:21 +0000 (13:55 +0200)]
input/binary: Code cleanup.

This cleans up a warning generated by clang's static analyzer.

10 years agoinput: Avoid NULL dereference.
Bert Vermeulen [Thu, 2 Oct 2014 11:51:19 +0000 (13:51 +0200)]
input: Avoid NULL dereference.

This cleans up a warning generated by clang's static analyzer.

10 years agosr_parse_sizestring: Deal with invalid strings better.
Bert Vermeulen [Thu, 2 Oct 2014 10:57:19 +0000 (12:57 +0200)]
sr_parse_sizestring: Deal with invalid strings better.

This cleans up a warning generated by clang's static analyzer.

10 years agoClean up sr_session_load().
Bert Vermeulen [Thu, 2 Oct 2014 09:32:52 +0000 (11:32 +0200)]
Clean up sr_session_load().

This cleans up some warnings generated by clang's static analyzer.
The function now also returns SR_ERR to signify the specified filename
does not point to a valid session file.

Other SR_ERR_* returns indicate a session file was found, but loading
failed.

10 years agoReturn sensible Device::description() for session and input devices.
Martin Ling [Tue, 30 Sep 2014 16:32:09 +0000 (17:32 +0100)]
Return sensible Device::description() for session and input devices.

10 years agoC++: Fix management of SessionDevice objects.
Martin Ling [Tue, 30 Sep 2014 15:05:27 +0000 (16:05 +0100)]
C++: Fix management of SessionDevice objects.

10 years agoC++: Add spaces in Device::description().
Martin Ling [Tue, 30 Sep 2014 12:19:27 +0000 (13:19 +0100)]
C++: Add spaces in Device::description().

10 years agoC++: Expose device serial number and connection ID.
Martin Ling [Tue, 30 Sep 2014 10:50:07 +0000 (11:50 +0100)]
C++: Expose device serial number and connection ID.

10 years agoC++: Expose config key capabilities.
Martin Ling [Tue, 30 Sep 2014 10:07:55 +0000 (11:07 +0100)]
C++: Expose config key capabilities.

10 years agobindings: Update for input API changes.
Martin Ling [Sat, 27 Sep 2014 15:29:34 +0000 (16:29 +0100)]
bindings: Update for input API changes.

10 years agoClean up internal input API docs.
Bert Vermeulen [Tue, 23 Sep 2014 10:05:31 +0000 (12:05 +0200)]
Clean up internal input API docs.

10 years agoinput: Use SR_ERR_NA instead of SR_OK_CONTINUE.
Bert Vermeulen [Tue, 23 Sep 2014 10:04:35 +0000 (12:04 +0200)]
input: Use SR_ERR_NA instead of SR_OK_CONTINUE.

10 years agoinput: sr_input_free() is now a void function.
Bert Vermeulen [Tue, 23 Sep 2014 09:27:50 +0000 (11:27 +0200)]
input: sr_input_free() is now a void function.

Its backend, input_module.cleanup(), is now also a void function.

10 years agoinput: Add sr_input_end().
Bert Vermeulen [Tue, 23 Sep 2014 09:12:33 +0000 (11:12 +0200)]
input: Add sr_input_end().

This signifies to the module instance no more input will come. This
will cause the module to process any data it may have buffered. The
SR_DF_END packet will also typically be sent at this time.

10 years agoinput: Free instance-private storage at instance free.
Bert Vermeulen [Mon, 22 Sep 2014 14:52:38 +0000 (16:52 +0200)]
input: Free instance-private storage at instance free.

10 years agoinput: Add sdi_ready flag to struct sr_input.
Bert Vermeulen [Mon, 22 Sep 2014 13:22:41 +0000 (15:22 +0200)]
input: Add sdi_ready flag to struct sr_input.

When an input module instance has received enough input to fully
populate the struct sr_dev_inst, sdi_ready is set to TRUE and its
receive() method returns immediately. Any remaining received data
is buffered until the next time the function is called.

10 years agoRemoval of sdi->index, step 8: fix victor-dmm
Soeren Apel [Sun, 28 Sep 2014 13:45:59 +0000 (15:45 +0200)]
Removal of sdi->index, step 8: fix victor-dmm

10 years agoRemoval of sdi->index, step 7: fix testo
Soeren Apel [Sun, 28 Sep 2014 12:33:03 +0000 (14:33 +0200)]
Removal of sdi->index, step 7: fix testo

10 years agoRemoval of sdi->index, step 6: fix sysclk-lwla
Soeren Apel [Sun, 28 Sep 2014 09:10:26 +0000 (11:10 +0200)]
Removal of sdi->index, step 6: fix sysclk-lwla

10 years agoRemoval of sdi->index, step 5: fix ikalogic-scanalogic2
Soeren Apel [Sat, 27 Sep 2014 21:03:52 +0000 (23:03 +0200)]
Removal of sdi->index, step 5: fix ikalogic-scanalogic2

10 years agoRemoval of sdi->index, step 4: fix trivial sr_dev_inst_new() calls
Soeren Apel [Sat, 27 Sep 2014 20:33:00 +0000 (22:33 +0200)]
Removal of sdi->index, step 4: fix trivial sr_dev_inst_new() calls

10 years agoRemoval of sdi->index, step 3: sr_dev_inst_new() calls for input mods
Soeren Apel [Sat, 27 Sep 2014 20:29:10 +0000 (22:29 +0200)]
Removal of sdi->index, step 3: sr_dev_inst_new() calls for input mods

10 years agoRemoval of sdi->index, step 2: remove it from sr_session_load()
Soeren Apel [Sat, 27 Sep 2014 20:26:06 +0000 (22:26 +0200)]
Removal of sdi->index, step 2: remove it from sr_session_load()

10 years agoRemoval of sdi->index, step 1: remove it from headers and helper funcs
Soeren Apel [Sat, 27 Sep 2014 20:20:51 +0000 (22:20 +0200)]
Removal of sdi->index, step 1: remove it from headers and helper funcs

10 years agosaleae-logic16: Use physical USB connection instead of sdi->index
Soeren Apel [Sat, 27 Sep 2014 20:15:45 +0000 (22:15 +0200)]
saleae-logic16: Use physical USB connection instead of sdi->index

10 years agoRemove sdi->index from openbench-logic-sniffer and pipistrello-ols
Soeren Apel [Sat, 27 Sep 2014 19:56:18 +0000 (21:56 +0200)]
Remove sdi->index from openbench-logic-sniffer and pipistrello-ols

10 years agohantek-dso: Use physical USB connection instead of sdi->index
Soeren Apel [Sat, 27 Sep 2014 19:51:56 +0000 (21:51 +0200)]
hantek-dso: Use physical USB connection instead of sdi->index

10 years agozeroplus-logic-cube: Use physical USB connection instead of sdi->index
Soeren Apel [Sat, 27 Sep 2014 18:48:47 +0000 (20:48 +0200)]
zeroplus-logic-cube: Use physical USB connection instead of sdi->index

10 years agoC++: handle uint32_t SR_CONF keys which contain key capabilities
Aurelien Jacobs [Mon, 29 Sep 2014 22:37:03 +0000 (00:37 +0200)]
C++: handle uint32_t SR_CONF keys which contain key capabilities

This adapts the C++ bindings according to commits 584560f and 5827f61.

10 years agofx2lafw: Use physical USB connection instead of sdi->index
Soeren Apel [Fri, 26 Sep 2014 17:25:36 +0000 (19:25 +0200)]
fx2lafw: Use physical USB connection instead of sdi->index

Previously, sdi->index was used to tell several identical fx2lafw-compatible
devices apart. This was a bit of a hack, so this patch makes it use physical
device connections instead. They're guaranteed to remain the same even if
the USB device reconnects.

10 years agoAdd sr_packet_copy/_free functions.
Bert Vermeulen [Thu, 25 Sep 2014 23:33:15 +0000 (01:33 +0200)]
Add sr_packet_copy/_free functions.

These will be used to make a copy of a packet on the session bus,
valid for the duration of the device instance that generated it.

10 years agoserial: Eliminate serial_read(), serial_write() and SERIAL_NONBLOCK.
Martin Ling [Sun, 21 Sep 2014 20:41:25 +0000 (21:41 +0100)]
serial: Eliminate serial_read(), serial_write() and SERIAL_NONBLOCK.

10 years agostd_serial_dev_open: Remove SERIAL_NONBLOCK flag.
Martin Ling [Sun, 21 Sep 2014 18:30:24 +0000 (19:30 +0100)]
std_serial_dev_open: Remove SERIAL_NONBLOCK flag.

All calls in drivers are now explicitly (non)blocking.

10 years agoscpi_serial: Mark read/write calls nonblocking, remove SERIAL_NONBLOCK.
Martin Ling [Sun, 21 Sep 2014 18:29:13 +0000 (19:29 +0100)]
scpi_serial: Mark read/write calls nonblocking, remove SERIAL_NONBLOCK.

These calls were already nonblocking. Having marked them as such, the flag can
be removed.

10 years agotondaj-sl-814: Remove SERIAL_NONBLOCK flag.
Martin Ling [Sun, 21 Sep 2014 18:25:47 +0000 (19:25 +0100)]
tondaj-sl-814: Remove SERIAL_NONBLOCK flag.

All calls in the driver are now explicitly (non)blocking.

10 years agotondaj-sl-814: Mark serial read/write calls as blocking.
Martin Ling [Sun, 21 Sep 2014 18:24:33 +0000 (19:24 +0100)]
tondaj-sl-814: Mark serial read/write calls as blocking.

These calls are executed from an event handler and were previously nonblocking,
but they have no partial read/write handling. The code is already marked TODO
for improvement.

10 years agotondaj-sl-814: Mark serial read call as nonblocking.
Martin Ling [Sun, 21 Sep 2014 18:19:51 +0000 (19:19 +0100)]
tondaj-sl-814: Mark serial read call as nonblocking.

This call was already nonblocking since the driver opens the port with the
SERIAL_NONBLOCK flag. Partial reads are handled.

10 years agoteleinfo: Mark serial read as nonblocking, remove SERIAL_NONBLOCK flag.
Martin Ling [Sun, 21 Sep 2014 18:17:02 +0000 (19:17 +0100)]
teleinfo: Mark serial read as nonblocking, remove SERIAL_NONBLOCK flag.

This call was already nonblocking due to the flag.

10 years agoopenbench-logic-sniffer: Remove SERIAL_NONBLOCK flag.
Martin Ling [Sun, 21 Sep 2014 18:15:36 +0000 (19:15 +0100)]
openbench-logic-sniffer: Remove SERIAL_NONBLOCK flag.

All calls in this driver are already explicitly (non)blocking.

10 years agonorma-dmm: Remove SERIAL_NONBLOCK flag.
Martin Ling [Sun, 21 Sep 2014 18:14:49 +0000 (19:14 +0100)]
norma-dmm: Remove SERIAL_NONBLOCK flag.

All calls in the driver are now explicitly (non)blocking.

10 years agonorma-dmm: Make serial write call block.
Martin Ling [Sun, 21 Sep 2014 18:14:05 +0000 (19:14 +0100)]
norma-dmm: Make serial write call block.

This call is executed from an event handler and was previously nonblocking,
but has no partial write handling. It sends a short packet so should be OK
to block, most likely the output buffer will be empty anyway.

10 years agonorma-dmm: Make write call block.
Martin Ling [Sun, 21 Sep 2014 18:12:16 +0000 (19:12 +0100)]
norma-dmm: Make write call block.

This call was previously nonblocking, but has no partial write handling.
It is called in the scan where it is free to block.

10 years agonorma-dmm: Mark serial read call as nonblocking.
Martin Ling [Sun, 21 Sep 2014 18:11:23 +0000 (19:11 +0100)]
norma-dmm: Mark serial read call as nonblocking.

This call was already nonblocking since the driver opens the port with the
SERIAL_NONBLOCK flag. It only reads one byte, and a zero result is handled
appropriately.

10 years agomotech-lps-30x: Remove SERIAL_NONBLOCK.
Martin Ling [Sun, 21 Sep 2014 18:05:03 +0000 (19:05 +0100)]
motech-lps-30x: Remove SERIAL_NONBLOCK.

All calls in the driver are now explicitly (non)blocking.

10 years agomotech-lps-30x: Make serial write call block.
Martin Ling [Sun, 21 Sep 2014 18:03:26 +0000 (19:03 +0100)]
motech-lps-30x: Make serial write call block.

This call was previously explicitly nonblocking, but has no partial write
handling. It sends a short packet so should be OK to block, most likely the
output buffer will be empty anyway.

10 years agomotech-lps-30x: Mark serial read call as nonblocking.
Martin Ling [Sun, 21 Sep 2014 17:59:45 +0000 (18:59 +0100)]
motech-lps-30x: Mark serial read call as nonblocking.

This call was already nonblocking since the driver opens the port with the
SERIAL_NONBLOCK flag. It only reads one byte, and a zero result is handled
appropriately.

10 years agomic-985xx: Remove SERIAL_NONBLOCK call.
Martin Ling [Sun, 21 Sep 2014 17:55:21 +0000 (18:55 +0100)]
mic-985xx: Remove SERIAL_NONBLOCK call.

All calls in the driver are now explicitly (non)blocking.

10 years agomic-985xx: Make serial write call block.
Martin Ling [Sun, 21 Sep 2014 17:54:00 +0000 (18:54 +0100)]
mic-985xx: Make serial write call block.

This call is executed from an event handler and was previously nonblocking,
but has no partial write handling. It sends a short packet so should be OK
to block, most likely the output buffer will be empty anyway.

10 years agomic-985xx: Mark serial read as nonblocking.
Martin Ling [Sun, 21 Sep 2014 17:52:20 +0000 (18:52 +0100)]
mic-985xx: Mark serial read as nonblocking.

This call was already nonblocking since the driver opens the port with the
SERIAL_NONBLOCK flag. Partial reads are handled.

10 years agogmc-mh-1x-2x: Remove SERIAL_NONBLOCK flag.
Martin Ling [Sun, 21 Sep 2014 17:45:36 +0000 (18:45 +0100)]
gmc-mh-1x-2x: Remove SERIAL_NONBLOCK flag.

All calls in the driver are now explicitly (non)blocking.

10 years agogmc-mh-1x-2x: Make serial write calls block.
Martin Ling [Sun, 21 Sep 2014 17:44:20 +0000 (18:44 +0100)]
gmc-mh-1x-2x: Make serial write calls block.

These calls are executed from an event handler and were previously nonblocking,
but have no partial write handling. They send short packets so should be OK to
block, most likely the output buffer will be empty anyway.

Fix error handling for some: serial_write can return any negative error code.

10 years agogmc-mh-1x-2x: Make serial write call block, and fix error handling.
Martin Ling [Sun, 21 Sep 2014 17:40:47 +0000 (18:40 +0100)]
gmc-mh-1x-2x: Make serial write call block, and fix error handling.

This call was previously nonblocking, but there is no handling of partial
writes. It is called from config_set where it is free to block.

Also fix error handling: serial_write can return any negative error code,
not just -1.

10 years agogmc-mh-1x-2x: Mark serial read calls as nonblocking.
Martin Ling [Sun, 21 Sep 2014 17:36:00 +0000 (18:36 +0100)]
gmc-mh-1x-2x: Mark serial read calls as nonblocking.

These calls were already nonblocking since the driver opens the port with the
SERIAL_NONBLOCK flag. They only read one byte. A return value of zero is not
handled, but should not occur in theory due to the G_IO_IN check. It might be
good to add handling of a zero return anyway, since I'm not sure if this is
always accurate.

10 years agogmc-mh-1x-2x: Mark serial read call as nonblocking.
Martin Ling [Sun, 21 Sep 2014 17:33:34 +0000 (18:33 +0100)]
gmc-mh-1x-2x: Mark serial read call as nonblocking.

This call was already nonblocking since the driver opens the port with the
SERIAL_NONBLOCK flag. It only reads one byte, and a zero result is handled
appropriately.

10 years agofluke-dmm: Make serial write calls block, and fix error handling.
Martin Ling [Sun, 21 Sep 2014 17:26:16 +0000 (18:26 +0100)]
fluke-dmm: Make serial write calls block, and fix error handling.

These calls are executed from an event handler and were previously nonblocking,
but have no partial write handling. They send short packets so should be OK to
block, most likely the output buffer will be empty anyway.

Also fix error handling for these calls, which seems to have been retained from
previous direct usage of write() to a serial port fd.

10 years agofluke-dmm: Make serial write calls block, and fix error handling.
Martin Ling [Sun, 21 Sep 2014 17:16:04 +0000 (18:16 +0100)]
fluke-dmm: Make serial write calls block, and fix error handling.

These calls were previously nonblocking, but have no partial write handling.
They are made from scan and acquisition_start contexts where they are free
to block.

Remove the SERIAL_NONBLOCK at open, which only applied during scan, since all
calls in the scan are now explicitly blocking.

Also fix error handling for these calls, which appears to have been kept
from a previous direct usage of write() on a serial port fd.

10 years agofluke-dmm: Mark serial read call as nonblocking.
Martin Ling [Sun, 21 Sep 2014 17:12:48 +0000 (18:12 +0100)]
fluke-dmm: Mark serial read call as nonblocking.

This call was already nonblocking since the driver opens the port with the
SERIAL_NONBLOCK flag. Only one byte is read. The case of 0 being returned
is not handled, but the call is only made if G_IO_IN occurred so in theory,
there should be a byte available. It might be wise to add handling for a
return of 0 nonetheless, as I'm not sure if this is always accurate.

10 years agoconrad-digi-35-cpu: Make serial write call block.
Martin Ling [Sun, 21 Sep 2014 17:07:14 +0000 (18:07 +0100)]
conrad-digi-35-cpu: Make serial write call block.

This call was previously nonblocking, but there is no partial write handling.
It is only called from config_set so it is free to block.

10 years agoconrad-digi-35-cpu: Remove SERIAL_NONBLOCK flag from open at scan time.
Martin Ling [Sun, 21 Sep 2014 17:05:56 +0000 (18:05 +0100)]
conrad-digi-35-cpu: Remove SERIAL_NONBLOCK flag from open at scan time.

This open call is only made to check access, the port is closed immediately
afterwards. The flag therefore has no effect.

10 years agocolead-slm: Mark serial read calls as nonblocking.
Martin Ling [Sun, 21 Sep 2014 16:54:18 +0000 (17:54 +0100)]
colead-slm: Mark serial read calls as nonblocking.

This is an odd one. These calls are made from a receive handler so should not
block, and appear to be setup correctly to handle partial reads or no data
available. However, the driver was not opening the port with SERIAL_NONBLOCK
so these calls would have been blocking. Make them nonblocking.

10 years agocenter-3xx: Remove SERIAL_NONBLOCK flag.
Martin Ling [Sun, 21 Sep 2014 16:51:50 +0000 (17:51 +0100)]
center-3xx: Remove SERIAL_NONBLOCK flag.

All serial calls in this driver are now explicitly (non)blocking.

10 years agocenter-3xx: Make serial write call block.
Martin Ling [Sun, 21 Sep 2014 16:51:25 +0000 (17:51 +0100)]
center-3xx: Make serial write call block.

This call is executed from an event handler and was previously nonblocking,
but has no partial write handling. It sends a short packet so should be OK
to block, most likely the output buffer will be empty anyway.

10 years agocenter-3xx: Mark serial read call as nonblocking.
Martin Ling [Sun, 21 Sep 2014 16:46:39 +0000 (17:46 +0100)]
center-3xx: Mark serial read call as nonblocking.

This call was already nonblocking because the driver opens the port with the
SERIAL_NONBLOCK flag. Partial reads are handled.

10 years agocem-dt-885x: Mark serial access as nonblocking, remove SERIAL_NONBLOCK flag.
Martin Ling [Sun, 21 Sep 2014 16:41:05 +0000 (17:41 +0100)]
cem-dt-885x: Mark serial access as nonblocking, remove SERIAL_NONBLOCK flag.

These calls were already nonblocking since this driver opened the port with
the SERIAL_NONBLOCK flag. Having marked them as such, we can remove the flag.

Also remove an unnecessary reopen of the port to change its blocking status.

10 years agobrymen-dmm: Remove SERIAL_NONBLOCK flag.
Martin Ling [Tue, 16 Sep 2014 01:49:27 +0000 (02:49 +0100)]
brymen-dmm: Remove SERIAL_NONBLOCK flag.

All serial read/write calls in the driver are now explicitly (non)blocking.

10 years agobrymen-dmm: Make serial write call block.
Martin Ling [Tue, 16 Sep 2014 01:47:28 +0000 (02:47 +0100)]
brymen-dmm: Make serial write call block.

This call is executed from an event handler and was previously nonblocking,
but has no partial write handling. It sends a short packet so should be OK
to block, most likely the output buffer will be empty anyway.

10 years agobrymen-dmm: Mark serial read calls as nonblocking.
Martin Ling [Tue, 16 Sep 2014 01:42:26 +0000 (02:42 +0100)]
brymen-dmm: Mark serial read calls as nonblocking.

The driver opens the port with SERIAL_NONBLOCK so these were already
nonblocking, and are handled appropriately.

10 years agoatten-pps3xxx: Remove SERIAL_NONBLOCK.
Martin Ling [Tue, 16 Sep 2014 01:34:09 +0000 (02:34 +0100)]
atten-pps3xxx: Remove SERIAL_NONBLOCK.

All serial read/write calls in the driver are now explicitly (non)blocking.

10 years agoatten-pps3xxx: Make serial write call block.
Martin Ling [Tue, 16 Sep 2014 01:36:42 +0000 (02:36 +0100)]
atten-pps3xxx: Make serial write call block.

This call is executed from an event handler and was previously nonblocking,
but has no partial write handling. It sends a short packet so should be OK
to block, most likely the output buffer will be empty anyway.

10 years agoatten-pps3xxx: Make serial write call block in scan.
Martin Ling [Tue, 16 Sep 2014 01:32:37 +0000 (02:32 +0100)]
atten-pps3xxx: Make serial write call block in scan.

This is called at scan time so free to block. There is no partial write
handling and a response is expected afterwards. This should therefore be a
blocking call.

10 years agoappa-55ii: Mark serial read nonblocking and remove SERIAL_NONBLOCK.
Martin Ling [Tue, 16 Sep 2014 01:29:57 +0000 (02:29 +0100)]
appa-55ii: Mark serial read nonblocking and remove SERIAL_NONBLOCK.

This is the only read/write call in the driver. It is already non-blocking
and is handled appropriately.

10 years agoaglient-dmm: Remove SERIAL_NONBLOCK flag.
Martin Ling [Tue, 16 Sep 2014 01:17:47 +0000 (02:17 +0100)]
aglient-dmm: Remove SERIAL_NONBLOCK flag.

All serial calls in this driver are now explicitly (non)blocking.

10 years agoagilent-dmm: Make serial write call block in send.
Martin Ling [Tue, 16 Sep 2014 01:14:23 +0000 (02:14 +0100)]
agilent-dmm: Make serial write call block in send.

This call is executed from an event handler context was previously
nonblocking, however there is no handling for a partial write.

The output buffer is unlikely to be full and the commands to be sent
are short, so it should be OK to make this a blocking call.

10 years agoagilent-dmm: Make serial write call block in scan.
Martin Ling [Tue, 16 Sep 2014 01:11:05 +0000 (02:11 +0100)]
agilent-dmm: Make serial write call block in scan.

This call is executed at scan time so is free to block. There is no
handling for a partial write and a response is expected immediately
afterwards. It should therefore be a blocking call.

10 years agoagilent-dmm: Mark serial read call as nonblocking.
Martin Ling [Tue, 16 Sep 2014 01:07:08 +0000 (02:07 +0100)]
agilent-dmm: Mark serial read call as nonblocking.

This driver opens the port with the SERIAL_NONBLOCK flag, so this call is
already a nonblocking one, and is handled appropriately.

10 years agoserial-dmm: Remove SERIAL_NONBLOCK flag.
Martin Ling [Tue, 16 Sep 2014 01:01:27 +0000 (02:01 +0100)]
serial-dmm: Remove SERIAL_NONBLOCK flag.

All serial read/write calls in this driver are now explicitly
nonblocking so there is no need for this flag.

10 years agoserial-dmm: Mark serial read/write calls as nonblocking.
Martin Ling [Tue, 16 Sep 2014 00:58:54 +0000 (01:58 +0100)]
serial-dmm: Mark serial read/write calls as nonblocking.

This driver opens the port with the SERIAL_NONBLOCK flag so these calls were
already non-blocking.

10 years agocolead-slm: Mark serial write call as blocking.
Martin Ling [Tue, 16 Sep 2014 00:52:14 +0000 (01:52 +0100)]
colead-slm: Mark serial write call as blocking.

This driver opens the port without the SERIAL_NONBLOCK flag,
so this call was already blocking.