2 * Copyright 2008-2012, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
16 usb_get_vendor_info(uint16 vendorID
, const char **vendorName
)
19 for (i
= 0; i
< (int)USB_VENTABLE_LEN
; i
++) {
20 if (UsbVenTable
[i
].VenId
== vendorID
) {
21 *vendorName
= UsbVenTable
[i
].VenName
&& UsbVenTable
[i
].VenName
[0]
22 ? UsbVenTable
[i
].VenName
: NULL
;
31 usb_get_device_info(uint16 vendorID
, uint16 deviceID
, const char **deviceName
)
34 // search for the device
35 for (i
= 0; i
< (int)USB_DEVTABLE_LEN
; i
++) {
36 if (UsbDevTable
[i
].VenId
== vendorID
&& UsbDevTable
[i
].DevId
== deviceID
) {
37 *deviceName
= UsbDevTable
[i
].ChipDesc
&& UsbDevTable
[i
].ChipDesc
[0]
38 ? UsbDevTable
[i
].ChipDesc
: NULL
;