Skip to content

Commit e5d86da

Browse files
committed
Just force io_control to not accept turning the banks into multiple banks.
1 parent 7b76090 commit e5d86da

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

adafruit_mcp230xx/mcp23017.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@ def io_control(self):
259259

260260
@io_control.setter
261261
def io_control(self, val):
262+
val |= 0b000001
263+
val ^= 0b000001
262264
self._write_u8(_MCP23017_IOCON, val)
263265

264266
@property

adafruit_mcp230xx/mcp23s17.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,8 @@ def io_control(self):
263263

264264
@io_control.setter
265265
def io_control(self, val):
266+
val |= 0b000001
267+
val ^= 0b000001
266268
self._write_u8(_MCP23S17_IOCON, val)
267269

268270
@property

0 commit comments

Comments
 (0)