libsigrok/hardware/common
Daniel Thompson 5715e84fe3 serial: Only sleep when no characters are received.
g_usleep(XX) sleeps for *at least* XX microseconds but may sleep for
longers (on older kernels the sleep will typically be 10000us). Thus
byte receive loops containing an unconditional sleep will perform
very poorly (for example it causes the scan in agilent-dmm to timeout
prematurely).

Even on modern kernels serial_readline() has a 2ms sleep per byte which
means it will read at a maximum rate of half a character per millisecond
(~4800baud).

This is fixed by only sleeping when read() returns no data.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2013-09-26 14:57:37 +02:00
..
dmm Voltcraft VC-830: Fix diode mode handling. 2013-09-01 15:27:21 +02:00
Makefile.am Use consistent naming for internal libtool helper libs. 2013-05-10 17:44:01 +02:00
ezusb.c s/DRIVER_LOG_DOMAIN/LOG_PREFIX/. 2013-05-03 21:59:32 +02:00
serial.c serial: Only sleep when no characters are received. 2013-09-26 14:57:37 +02:00
usb.c s/DRIVER_LOG_DOMAIN/LOG_PREFIX/. 2013-05-03 21:59:32 +02:00