Overview
libusb 是一个 C 语言库,提供对 USB 设备的通用访问。其目的是供开发人员使用,以方便开发与 USB 硬件通信的应用程序。
它具有可移植性: 它使用单一的跨平台 API,可访问 Linux、macOS、Windows 等平台上的 USB 设备。
它使用的是用户模式: 应用程序与设备通信时无需特殊权限或提升权限。
它是版本无关的: 支持从 1.0 到 3.1(最新)的所有 USB 协议版本。
libusb is a C library that provides generic access to USB devices. It is intended to be used by developers to facilitate the production of applications that communicate with USB hardware.
It is portable: Using a single cross-platform API, it provides access to USB devices on Linux, macOS, Windows, etc.
It is user-mode: No special privilege or elevation is required for the application to communicate with a device.
It is version-agnostic: All versions of the USB protocol, from 1.0 to 3.1 (latest), are supported.
如果你使用的是 Linux,你的发行版很可能已经包含 libusb,因此您可能只需在源代码中引用 libusb 头文件即可。
对于其他平台,或者如果