usb_id 0.1.0
usb_id: ^0.1.0 copied to clipboard

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.

The USB ID Repository for Dart #

pub license: BSD style: lint CI codecov

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 #

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 One

  final deviceClass = UsbId.lookupDeviceClass(0xe0);
  print('\nDevice class 0xe0: ${deviceClass!.name}'); // Wireless

  final subclass = UsbId.lookupSubclass(0x02, deviceClassId: deviceClass.id);
  print('  Subclass 0x02:   ${subclass!.name}'); // Wireless USB Wire Adapter
}
1
likes
110
pub points
23%
popularity

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.

Homepage (insecure)
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

args, equatable, path, quiver

More

Packages that depend on usb_id