header: Clarify comment on hid_read() and hid_read_timeout()

Clarify that a return value of zero means no packet was available.
This commit is contained in:
Alan Ott
2013-11-01 09:38:31 -04:00
parent 40cf516139
commit 1a42177fa5

View File

@@ -218,7 +218,8 @@ extern "C" {
@returns
This function returns the actual number of bytes read and
-1 on error.
-1 on error. If no packet was available to be read within
the timeout period, this function returns 0.
*/
int HID_API_EXPORT HID_API_CALL hid_read_timeout(hid_device *dev, unsigned char *data, size_t length, int milliseconds);
@@ -237,7 +238,8 @@ extern "C" {
@returns
This function returns the actual number of bytes read and
-1 on error.
-1 on error. If no packet was available to be read and
the handle is in non-blocking mode, this function returns 0.
*/
int HID_API_EXPORT HID_API_CALL hid_read(hid_device *device, unsigned char *data, size_t length);