master
David Kebler 2017-01-21 17:21:26 -08:00
parent 2e05b40eda
commit e6735ed883
1 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@
const fs = require('mz/fs'),
EventEmitter = require('events'),
Epoll = require('epoll').Epoll,
pSeries = require('p-series')
_ = require('uci-utils')
const GPIO_ROOT_PATH = '/sys/class/gpio/'
@ -26,8 +26,8 @@ class Interrupt extends EventEmitter {
init() {
let tasks = [
fs.writeFile(GPIO_ROOT_PATH + 'export', this.num)
// fs.writeFile(this.path + 'direction', 'in'),
() => fs.writeFile(GPIO_ROOT_PATH + 'export', this.num).then((resp) => { console.log('exported', resp) }),
() => fs.writeFile(this.path + 'direction', 'in').then((resp) => { console.log('direction', resp) }),
// fs.writeFile(this.path + 'edge', this.edge),
// fs.open(this.path + 'value', 'r+').then(fd => { this.valuefd = fd }),
// this.clear().then(() => { this.start() })