hameg-hmo: Also start reading on timeout (workaround for USBTMC)

scpi_serial generate an POLLIN event after the requested data is returned
by the instrument. For USBTMC it is necessary to
1. send an REQUEST_DEV_DEP_MSG_IN request
2. submit an USB bulk read transfer asynchronously.

Using the synchronous libusb_bulk_read() does not generate an POLLIN event.

Solving this properly needs major surgery in spci_usbtmc_libusb.
This commit is contained in:
Stefan Brüns 2016-04-17 19:14:27 +02:00 committed by Uwe Hermann
parent 055804e89e
commit f4f273ce1e
1 changed files with 4 additions and 0 deletions

View File

@ -743,8 +743,12 @@ SR_PRIV int hmo_receive_data(int fd, int revents, void *cb_data)
if (!(devc = sdi->priv))
return TRUE;
/* Although this is correct in general, the USBTMC libusb implementation
* currently does not generate an event prior to the first read. Often
* it is ok to start reading just after the 50ms timeout. See bug #785.
if (revents != G_IO_IN)
return TRUE;
*/
ch = devc->current_channel->data;