0.0.5 • Published 8 years ago

usbinfo v0.0.5

Weekly downloads
4
License
-
Repository
github
Last release
8 years ago

usbinfo

Used to load USB info from idVendor and idProduct for Device and Vendor. Other info (classes, protocols) will be added. Uses http://www.linux-usb.org/usb.ids to identify the IDs

Usage

idVendor and idProduct must be in the form of hex strings, filled with trailing zeroes (e.g. 0002 and not2). If not, the pad with leading zeroes is done automatically.

getProduct

In this example product is { vendorId: '03eb', productId: '2044', product: 'LUFA CDC Demo Application', vendor: 'Atmel Corp.' }. If the vendor is found but the product id is not found, only vendor description is returned.

var usbinfo = require('usbinfo')

usbinfo.getProduct('0001', '7778', (err, product) => {
  if (err) return console.log(err)
  // do something (...)
})

getVendor

In this example vendor is { vendorId: '03eb', vendor: 'Atmel Corp.' }

usbinfo.getVendor('03eb', (err, vendor) => {
  if (err) return console.log(err)
  // do something (...)
})
0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago