remove queue wrap of bus r/w
parent
635d7fc35e
commit
f724ef775e
|
@ -13,9 +13,12 @@ class MCP23008 extends Device {
|
||||||
this.ports = {}
|
this.ports = {}
|
||||||
opts.portID = 'A'
|
opts.portID = 'A'
|
||||||
this.ports.A = new Port(opts)
|
this.ports.A = new Port(opts)
|
||||||
|
console.log(this.ports.A)
|
||||||
// if not specified there RPi is not managing the interrupt
|
// if not specified there RPi is not managing the interrupt
|
||||||
// pin number on RPi that is connected to and services the interrupt. 4/17/27/22 = 7/11/13/15
|
// pin number on RPi that is connected to and services the interrupt. 4/17/27/22 = 7/11/13/15
|
||||||
|
if (opts.interPin) {
|
||||||
this.ports.A.interPin = opts.interPin.A ? opts.interPin.A : opts.interPin
|
this.ports.A.interPin = opts.interPin.A ? opts.interPin.A : opts.interPin
|
||||||
|
}
|
||||||
} // end constructor
|
} // end constructor
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
|
@ -132,8 +135,10 @@ class MCP23017 extends MCP23008 {
|
||||||
// add a second port
|
// add a second port
|
||||||
opts.portID = 'B'
|
opts.portID = 'B'
|
||||||
this.ports.B = new Port(opts)
|
this.ports.B = new Port(opts)
|
||||||
|
if (opts.interPin) {
|
||||||
this.ports.B.interPin = opts.interPin.B ? opts.interPin.B : opts.interPin
|
this.ports.B.interPin = opts.interPin.B ? opts.interPin.B : opts.interPin
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pin(id, port) {
|
pin(id, port) {
|
||||||
if (!port) {
|
if (!port) {
|
||||||
|
|
Loading…
Reference in New Issue