This commit is contained in:
2018-05-16 10:10:23 +02:00
commit 79abc63edd
597 changed files with 93351 additions and 0 deletions

35
node_modules/onoff/test/configure-and-check-output.js generated vendored Normal file
View File

@ -0,0 +1,35 @@
"use strict";
const Gpio = require('../onoff').Gpio;
const assert = require('assert');
const output = new Gpio(17, 'out');
assert(output.direction() === 'out');
output.writeSync(1);
assert(output.readSync() === 1);
output.writeSync(0);
assert(output.readSync() === 0);
output.write(1, (err) => {
if (err) {
throw err;
}
output.read((err, value) => {
if (err) {
throw err;
}
assert(value === 1);
output.writeSync(0);
assert(output.readSync() === 0);
output.unexport();
console.log('ok - ' + __filename);
});
});