Forked from romilly. Changed the way SPI handler is injected in constructor
Fork of MCP23S17 by
Diff: MCP23S17.cpp
- Revision:
- 4:d501c74550a0
- Parent:
- 3:089a2a754567
- Child:
- 6:7b5e59c0e71c
diff -r 089a2a754567 -r d501c74550a0 MCP23S17.cpp --- a/MCP23S17.cpp Sun Aug 22 12:05:06 2010 +0000 +++ b/MCP23S17.cpp Sun Aug 22 12:12:58 2010 +0000 @@ -16,7 +16,7 @@ char MCP23S17::_read(char address) { _ncs = 0; - _spi.write(_readOpcode); + _spi.write(_readOpcode); _spi.write(address); char result = _spi.write(0); _ncs = 1; @@ -36,23 +36,23 @@ } void MCP23S17::directionA(char direction) { - _write(IODIRA, direction); + _write(IODIRA, direction); } void MCP23S17::directionB(char direction) { - _write(IODIRB, direction); + _write(IODIRB, direction); } - void intconA(char interruptsEnabledMask) { - _write(INTCONA, interruptsEnabledMask); - } +void MCP23S17::gpIntEnA(char interruptsEnabledMask) { + _write(GPINTENA, interruptsEnabledMask); +} void MCP23S17::outputA(char byte) { - _write(OLATA, byte); + _write(OLATA, byte); } void MCP23S17::outputB(char byte) { - _write(OLATB, byte); + _write(OLATB, byte); } char MCP23S17::inputA() {