[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200808291034.09307.oliver@neukum.org>
Date: Fri, 29 Aug 2008 10:34:08 +0200
From: Oliver Neukum <oliver@...kum.org>
To: stefan_kopp@...lent.com
Cc: korgull@...e.nl, greg@...ah.com, stern@...land.harvard.edu,
linux-usb@...r.kernel.org, me@...ipebalbi.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] USB: add USB test and measurement class driver - round 2
Am Freitag 29 August 2008 10:14:46 schrieb stefan_kopp@...lent.com:
> USBTMC has a different concept, the "termination character". If this is enabled and set to the appropriate character (usually /n), the read operation will be terminated by the device automatically. The last character in the response will be the termination character. Note, however, this capability is optional (not every vendor supports it) and even if it is supported, is might be deactivated (for good reason, e.g. for transfer of binary data).
>
> If you are not using the termination character, the device will typically send its full output buffer contents. Usually, this works just fine because communication with the device is transactional, one query followed by a response, then another query, followed by another response, and so on.
>
> The driver does return the number of characters received in both cases (with or without use of the term character feature).
But how do you learn in user space how many characters the device actually
did send? Using read() you'll only learn that the answer was shorter than
you asked for. If you get the amount you expected the answer may have
been as long as you expected or longer. How do you find out whether the answer
was longer?
Regards
Oliver
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists