little-core-labs / hidraw-native

N-API native node module to export constants from `linux/hidraw.h`

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hidraw-native

N-API native node module to export constants from linux/hidraw.h (and linux/hid.h).

Installation

$ npm install hidraw-native

Usage

const { HIDIOCGRDESCSIZE } = require('hidraw-native')

API

The following constants are exported:

  • HIDRAW_REPORT_DESCRIPTOR_BYTES (sizeof(struct hidraw_report_descriptor))
  • HIDRAW_DEVINFO_BYTES (sizeof(struct hidraw_devinfo))

From linux/hidraw.h:

  • HIDIOCGRDESCSIZE
  • HIDIOCGRAWINFO
  • HIDIOCGRDESC
  • HIDRAW_FIRST_MINOR
  • HIDRAW_MAX_DEVICES

From linux/hid.h:

  • HID_REQ_GET_REPORT
  • HID_REQ_GET_IDLE
  • HID_REQ_GET_PROTOCOL
  • HID_REQ_SET_REPORT
  • HID_REQ_SET_IDLE
  • HID_REQ_SET_PROTOCOL
  • HID_DT_HID
  • HID_DT_REPORT
  • HID_DT_PHYSICAL
  • HID_MAX_DESCRIPTOR_SIZE

License

MIT

About

N-API native node module to export constants from `linux/hidraw.h`

License:MIT License


Languages

Language:C 54.1%Language:JavaScript 33.9%Language:Python 8.2%Language:Vim Script 3.8%