updates
parent
2e05b40eda
commit
e6735ed883
|
@ -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() })
|
||||
|
|
Loading…
Reference in New Issue