UNPKG

@ginden/blinkstick-v2

Version:
26 lines 884 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NodeHidSyncTransport = void 0; const as_buffer_1 = require("../utils/as-buffer"); const usb_transport_1 = require("./usb-transport"); class NodeHidSyncTransport extends usb_transport_1.UsbTransport { constructor(device) { super(); this.device = device; } async sendFeatureReport(data) { return this.device.sendFeatureReport(data); } async getFeatureReport(reportId, reportLength) { const report = this.device.getFeatureReport(reportId, reportLength); return (0, as_buffer_1.asBuffer)(report); } getDeviceInfo() { return this.device.getDeviceInfo(); } async close() { return this.device.close(); } } exports.NodeHidSyncTransport = NodeHidSyncTransport; //# sourceMappingURL=node-hid-sync-transport.js.map