OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
| 5 // Use the <code>chrome.usb</code> module to interact with connected USB |
| 6 // devices. This API provides access to USB operations from within the context |
| 7 // of an app or extension. Using this API, apps and extensions can function as |
| 8 // drivers for hardware devices. |
| 9 |
| 10 [availability=26] |
5 namespace usb { | 11 namespace usb { |
6 | 12 |
7 // Direction, Recipient and RequestType all map to their namesakes within the | 13 // Direction, Recipient and RequestType all map to their namesakes within the |
8 // USB specification. | 14 // USB specification. |
9 enum Direction {in, out}; | 15 enum Direction {in, out}; |
10 enum Recipient {device, _interface, endpoint, other}; | 16 enum Recipient {device, _interface, endpoint, other}; |
11 enum RequestType {standard, class, vendor, reserved}; | 17 enum RequestType {standard, class, vendor, reserved}; |
12 | 18 |
13 // A Device encapsulates everything that is needed to communicate with a USB | 19 // A Device encapsulates everything that is needed to communicate with a USB |
14 // device. They are returned by findDevice calls and have all of their | 20 // device. They are returned by findDevice calls and have all of their |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 // Performs an isochronous transfer on the specific device. | 172 // Performs an isochronous transfer on the specific device. |
167 // |device|: An open device to make the transfer on. | 173 // |device|: An open device to make the transfer on. |
168 // |transferInfo|: The parameters to the transfer. See | 174 // |transferInfo|: The parameters to the transfer. See |
169 // IsochronousTransferInfo. | 175 // IsochronousTransferInfo. |
170 // |callback|: Invoked once the transfer has been completed. | 176 // |callback|: Invoked once the transfer has been completed. |
171 static void isochronousTransfer(Device device, | 177 static void isochronousTransfer(Device device, |
172 IsochronousTransferInfo transferInfo, | 178 IsochronousTransferInfo transferInfo, |
173 TransferCallback callback); | 179 TransferCallback callback); |
174 }; | 180 }; |
175 }; | 181 }; |
OLD | NEW |