mirror of
https://github.com/siemens-mobile-hacks/node-serialport-bindings-cpp.git
synced 2026-11-28 11:57:30 +00:00
commit
9d1c2e3857
1 changed files with 8 additions and 9 deletions
|
|
@ -246,16 +246,15 @@ function listUnix (callback) {
|
|||
}, callback);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
exports.list = function (callback) {
|
||||
if (process.platform === 'win32') {
|
||||
SerialPortBinding.list(callback);
|
||||
} else if (process.platform === 'darwin') {
|
||||
SerialPortBinding.list(callback);
|
||||
} else {
|
||||
listUnix(callback);
|
||||
}
|
||||
};
|
||||
if (process.platform === 'win32') {
|
||||
exports.list = SerialPortBinding.list
|
||||
} else if (process.platform === 'darwin') {
|
||||
exports.list = SerialPortBinding.list;
|
||||
} else {
|
||||
exports.list = listUnix;
|
||||
}
|
||||
|
||||
SerialPort.prototype.flush = function (callback) {
|
||||
var self = this;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue