From e6735ed8834a5a667085f38bf6770e765a35196d Mon Sep 17 00:00:00 2001 From: David Kebler Date: Sat, 21 Jan 2017 17:21:26 -0800 Subject: [PATCH] updates --- lib/interrupt.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/interrupt.js b/lib/interrupt.js index 7cf6466..eba6158 100644 --- a/lib/interrupt.js +++ b/lib/interrupt.js @@ -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() })