How to use the node-hid.setDriverType function in node-hid

To help you get started, we’ve selected a few node-hid examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bitfocus / companion / lib / elgato_dm.js View on Github external
* disclosing the source code of your own applications.
 *
 */


var debug   = require('debug')('lib/elgato_dm');
var HID = require('node-hid');
var deviceHandler = require('./device');
var usb = require('./usb');
var elgatoEmulator = require('./elgato_emulator');
var elgatoPluginDevice = require('./elgato_plugin');
var satelliteDevice = require('./satellite_device');
var preview = require('./preview');
var system;

HID.setDriverType('libusb');

debug("module required");

var instances = {};

function elgatoDM(_system) {
	var self = this;
	system = _system;

	system.on('elgatodm_remove_device', self.removeDevice.bind(self));

	system.on('devices_list_get', function (cb) {
		var ary = [];

		for (var id in instances) {
			ary.push({ id: instances[id].id, serialnumber: instances[id].serialnumber, type: instances[id].type, config: instances[id].config });

node-hid

USB HID device access library

BSD-3-Clause
Latest version published 5 months ago

Package Health Score

76 / 100
Full package analysis

Similar packages