https://github.com/jpnurmi/usb_id.dart
The USB ID Repository for Dart
https://github.com/jpnurmi/usb_id.dart
dart usb
Last synced: 4 months ago
JSON representation
The USB ID Repository for Dart
- Host: GitHub
- URL: https://github.com/jpnurmi/usb_id.dart
- Owner: jpnurmi
- License: bsd-3-clause
- Created: 2021-05-14T19:35:28.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-14T20:24:26.000Z (about 4 years ago)
- Last Synced: 2025-01-24T14:34:55.918Z (6 months ago)
- Topics: dart, usb
- Language: Dart
- Homepage: http://www.linux-usb.org/usb-ids.html
- Size: 793 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# The USB ID Repository for Dart
[](https://pub.dev/packages/usb_id)
[](https://opensource.org/licenses/BSD-3-Clause)
[](https://pub.dev/packages/lint)

[](https://codecov.io/gh/jpnurmi/usb_id.dart)A repository of all known ID's used in USB devices: ID's of vendors,
devices, subsystems and device classes. This package can be utilized
to display human-readable names instead of cryptic numeric codes.### Usage
```dart
import 'package:usb_id/usb_id.dart';void main() {
final vendor = UsbId.lookupVendor(0x18d1);
print('Vendor 0x18d1: ${vendor!.name}'); // Google Inc.final device = UsbId.lookupDevice(0x4e11, vendorId: vendor.id);
print(' Device 0x4e11: ${device!.name}'); // Nexus Onefinal deviceClass = UsbId.lookupDeviceClass(0xe0);
print('\nDevice class 0xe0: ${deviceClass!.name}'); // Wirelessfinal subclass = UsbId.lookupSubclass(0x02, deviceClassId: deviceClass.id);
print(' Subclass 0x02: ${subclass!.name}'); // Wireless USB Wire Adapter
}
```