@@ -124,15 +124,17 @@ void Adafruit_MCP23017::begin(uint8_t addr, TwoWire *theWire) {
124
124
125
125
_wire->begin ();
126
126
127
+ _wire->setClock (400000 );
128
+
127
129
// set defaults!
128
130
// all inputs on port A and B
129
131
writeRegister (MCP23017_IODIRA, 0xff );
130
132
writeRegister (MCP23017_IODIRB, 0xff );
131
-
133
+
132
134
// Turn off interrupt triggers
133
135
writeRegister (MCP23017_GPINTENA, 0x00 );
134
136
writeRegister (MCP23017_GPINTENB, 0x00 );
135
-
137
+
136
138
// Turn off pull up resistors
137
139
writeRegister (MCP23017_GPPUA, 0x00 );
138
140
writeRegister (MCP23017_GPPUB, 0x00 );
@@ -303,12 +305,6 @@ void Adafruit_MCP23017::setupInterruptPin(uint8_t pin, uint8_t mode) {
303
305
updateRegisterBit (pin, HIGH, MCP23017_GPINTENA, MCP23017_GPINTENB);
304
306
}
305
307
306
- /* *
307
- * Disable a pin for interrupt.
308
- *
309
- * @param pin Pin to set
310
- *
311
- */
312
308
void Adafruit_MCP23017::disableInterruptPin (uint8_t pin) {
313
309
// disable the pin for interrupt
314
310
updateRegisterBit (pin, LOW, MCP23017_GPINTENA, MCP23017_GPINTENB);
0 commit comments