From 421a4c7c15b84b5d0afd9f9d4b1f25e56c840b7e Mon Sep 17 00:00:00 2001 From: reillyg Date: Tue, 23 Feb 2016 17:12:31 -0800 Subject: Clarify chrome.usb API documentation on transfer lengths. This patch clarifies that the transfer length is only the maximum number of bytes that will be read from the device as the device is allowed to respond with a short packet. BUG=578508 Review URL: https://codereview.chromium.org/1724203002 Cr-Commit-Position: refs/heads/master@{#377163} --- extensions/common/api/usb.idl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'extensions/common') diff --git a/extensions/common/api/usb.idl b/extensions/common/api/usb.idl index 77163e7..21e4bd3 100644 --- a/extensions/common/api/usb.idl +++ b/extensions/common/api/usb.idl @@ -119,15 +119,16 @@ namespace usb { // The request type. RequestType requestType; - // The bRequest field, see Universal Serial Bus Specification - // Revision 1.1 § 9.3. + // The bRequest field, see Universal Serial Bus + // Specification Revision 1.1 § 9.3. long request; // The wValue field, see Ibid. long value; // The wIndex field, see Ibid. long index; - // The amount of data to receive (required only by input transfers). + // The maximum number of bytes to receive (required only by input + // transfers). long? length; // The data to transmit (required only by output transfers). @@ -146,7 +147,8 @@ namespace usb { // be claimed. long endpoint; - // The amount of data to receive (required only by input transfers). + // The maximum number of bytes to receive (required only by input + // transfers). long? length; // The data to transmit (required only by output transfers). -- cgit v1.1