adapt for new uci-dev package and utility changes
parent
13097c8d22
commit
f93ab1f994
|
@ -1,10 +1,8 @@
|
||||||
'use strict'
|
'use strict'
|
||||||
const Device = require('uci-i2c').Device,
|
const Device = require('uci-dev').Device,
|
||||||
Port = require('uci-gpio').Port,
|
Port = require('uci-gpio').Port,
|
||||||
_u = require('uci-utils')
|
_u = require('uci-utils')
|
||||||
|
|
||||||
const pSeries = require('p-series');
|
|
||||||
|
|
||||||
class MCP23008 extends Device {
|
class MCP23008 extends Device {
|
||||||
constructor(busObj, i2cAddress, opts) {
|
constructor(busObj, i2cAddress, opts) {
|
||||||
super(busObj, i2cAddress, opts)
|
super(busObj, i2cAddress, opts)
|
||||||
|
@ -49,7 +47,7 @@ class MCP23008 extends Device {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return pSeries(jobs)
|
return _u.pSeries(jobs)
|
||||||
} // end writePinsCfg
|
} // end writePinsCfg
|
||||||
|
|
||||||
// reads all pins in all ports
|
// reads all pins in all ports
|
||||||
|
@ -61,7 +59,7 @@ class MCP23008 extends Device {
|
||||||
jobs.push(() => super.read(reg))
|
jobs.push(() => super.read(reg))
|
||||||
reg += 0x10
|
reg += 0x10
|
||||||
}
|
}
|
||||||
return pSeries(jobs)
|
return _u.pSeries(jobs)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue