os/darwin: use IOUSBDevice as darwin_device_class explicitly

kIOUSBDeviceClassName define from IOUSBLib.h file was changed from
IOUSBDevice to IOUSBHostDevice in macOS Catalina.

In previous macOS versions, it was always defined as IOUSBDevice:
```
 #define kIOUSBDeviceClassName		 "IOUSBDevice"
```
In macOS Catalina it looks as follows:
```
 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_14
 #define kIOUSBDeviceClassName           "IOUSBDevice"
 #define kIOUSBInterfaceClassName        "IOUSBInterface"
 #else
 #define kIOUSBDeviceClassName           kIOUSBHostDeviceClassName
 #define kIOUSBInterfaceClassName        kIOUSBHostInterfaceClassName
 #endif /* MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_14 */
```

By default, macOS Catalina uses IOUSBHostDevice. The problem is that
using the IOUSBHostDevice class misses some devices.  This has been
described in 044a7ee commit. To work only with IOUSBDevice,
darwin_device_class has been explicitly set to IOUSBDevice.

Closes #693

For reference, here's the output of the 'listdevs' example before my changes:
05ac:027b (bus 128, device 2) path: 5
2109:0102 (bus 20, device 6) path: 4
05e3:0751 (bus 20, device 5) path: 1
1a40:0801 (bus 20, device 3) path: 2
0bda:8153 (bus 0, device 2) path: 3
2109:2817 (bus 20, device 1) path: 8
2109:0817 (bus 0, device 1) path: 4

And here's the output after my changes:
05ac:027b (bus 128, device 2) path: 5
2109:0102 (bus 20, device 6) path: 3.2.4
05e3:0751 (bus 20, device 5) path: 3.2.1
1a40:0801 (bus 20, device 3) path: 3.2
0bda:8153 (bus 0, device 2) path: 2.3
2109:2817 (bus 20, device 1) path: 3
2109:0817 (bus 0, device 1) path: 2

Closes #712

Signed-off-by: Nathan Hjelm <hjelmn@google.com>
2 files changed
tree: 0e420f6e5020892f48fe1247bb27df1e05695531
  1. .private/
  2. android/
  3. doc/
  4. examples/
  5. libusb/
  6. msvc/
  7. tests/
  8. Xcode/
  9. .gitattributes
  10. .gitignore
  11. .travis.yml
  12. appveyor.yml
  13. AUTHORS
  14. autogen.sh
  15. bootstrap.sh
  16. ChangeLog
  17. configure.ac
  18. COPYING
  19. INSTALL_WIN.txt
  20. libusb-1.0.pc.in
  21. Makefile.am
  22. NEWS
  23. PORTING
  24. README.git
  25. README.md
  26. test
  27. TODO
README.md

libusb

Build Status Build Status Coverity Scan Build Status

libusb is a library for USB device access from Linux, macOS, Windows, OpenBSD/NetBSD, Haiku and Solaris userspace. It is written in C (Haiku backend in C++) and licensed under the GNU Lesser General Public License version 2.1 or, at your option, any later version (see COPYING).

libusb is abstracted internally in such a way that it can hopefully be ported to other operating systems. Please see the PORTING file for more information.

libusb homepage: http://libusb.info/

Developers will wish to consult the API documentation: http://api.libusb.info

Use the mailing list for questions, comments, etc: http://mailing-list.libusb.info

(Please use the mailing list rather than mailing developers directly)