Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of MCP23S17 by
Diff: MCP23S17.cpp
- Revision:
- 4:d501c74550a0
- Parent:
- 3:089a2a754567
- Child:
- 6:7b5e59c0e71c
--- 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() {
