Skip to content

Commit 8716cd0

Browse files
authored
Update Adafruit_MCP23017.cpp
1 parent da518c9 commit 8716cd0

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

Adafruit_MCP23017.cpp

+4-8
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,17 @@ void Adafruit_MCP23017::begin(uint8_t addr, TwoWire *theWire) {
124124

125125
_wire->begin();
126126

127+
_wire->setClock(400000);
128+
127129
// set defaults!
128130
// all inputs on port A and B
129131
writeRegister(MCP23017_IODIRA, 0xff);
130132
writeRegister(MCP23017_IODIRB, 0xff);
131-
133+
132134
// Turn off interrupt triggers
133135
writeRegister(MCP23017_GPINTENA, 0x00);
134136
writeRegister(MCP23017_GPINTENB, 0x00);
135-
137+
136138
// Turn off pull up resistors
137139
writeRegister(MCP23017_GPPUA, 0x00);
138140
writeRegister(MCP23017_GPPUB, 0x00);
@@ -303,12 +305,6 @@ void Adafruit_MCP23017::setupInterruptPin(uint8_t pin, uint8_t mode) {
303305
updateRegisterBit(pin, HIGH, MCP23017_GPINTENA, MCP23017_GPINTENB);
304306
}
305307

306-
/**
307-
* Disable a pin for interrupt.
308-
*
309-
* @param pin Pin to set
310-
*
311-
*/
312308
void Adafruit_MCP23017::disableInterruptPin(uint8_t pin) {
313309
// disable the pin for interrupt
314310
updateRegisterBit(pin, LOW, MCP23017_GPINTENA, MCP23017_GPINTENB);

0 commit comments

Comments
 (0)