bmrequesttype

0.0.5 • Public • Published

bmRequestType

Calculate bmRequestType for USB

i.e.

Useful combined with e.g. node-usb.

Usage

npm i bmrequesttype
const { bmRequestType, DIRECTION, TYPE, RECIPIENT } = require('bmrequesttype');
bmRequestType(DIRECTION.Out, TYPE.Class, RECIPIENT.Interface); // 33

API

bmRequestType(direction, type, recipient)

DIRECTION.Out = 0
DIRECTION.In = 1

TYPE.Standard = 0
TYPE.Class = 1
TYPE.Vendor = 2
TYPE.Reserved = 3

RECIPIENT.Device = 0
RECIPIENT.Interface = 1
RECIPIENT.Endpoint = 2
RECIPIENT.Other = 3

Readme

Keywords

Package Sidebar

Install

npm i bmrequesttype

Weekly Downloads

2

Version

0.0.5

License

MIT

Unpacked Size

1.85 kB

Total Files

4

Last publish

Collaborators

  • penx
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy