You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
616 B
JavaScript
19 lines
616 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.SerialPort = void 0;
|
|
const stream_1 = require("@serialport/stream");
|
|
const bindings_cpp_1 = require("@serialport/bindings-cpp");
|
|
const DetectedBinding = (0, bindings_cpp_1.autoDetect)();
|
|
class SerialPort extends stream_1.SerialPortStream {
|
|
constructor(options, openCallback) {
|
|
const opts = {
|
|
binding: DetectedBinding,
|
|
...options,
|
|
};
|
|
super(opts, openCallback);
|
|
}
|
|
}
|
|
exports.SerialPort = SerialPort;
|
|
SerialPort.list = DetectedBinding.list;
|
|
SerialPort.binding = DetectedBinding;
|