https://github.com/little-core-labs/hidraw-native
N-API native node module to export constants from `linux/hidraw.h`
https://github.com/little-core-labs/hidraw-native
constants hidwar module napi native node
Last synced: 3 months ago
JSON representation
N-API native node module to export constants from `linux/hidraw.h`
- Host: GitHub
- URL: https://github.com/little-core-labs/hidraw-native
- Owner: little-core-labs
- License: mit
- Created: 2019-06-18T04:15:08.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-27T15:58:52.000Z (about 7 years ago)
- Last Synced: 2025-08-09T07:51:41.992Z (12 months ago)
- Topics: constants, hidwar, module, napi, native, node
- Language: C
- Size: 9.77 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
hidraw-native
=============
N-API native node module to export constants from `linux/hidraw.h` (and
`linux/hid.h`).
## Installation
```sh
$ npm install hidraw-native
```
## Usage
```js
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