Skip to content

Commit 0fcba75

Browse files
authored
Merge pull request #25 from P4rk/patch-1
Correct ICON Register init
2 parents 4c1c99b + 710e767 commit 0fcba75

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/MCP23017.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ void MCP23017::init()
1414
//SEQOP = 1 : sequential operation disabled, address pointer does not increment
1515
//DISSLW = 0 : slew rate enabled
1616
//HAEN = 0 : hardware address pin is always enabled on 23017
17-
//ODR = 0 : open drain output
17+
//ODR = 0 : active driver output (INTPOL bit sets the polarity.)
18+
1819
//INTPOL = 0 : interrupt active low
20+
//UNIMPLMENTED 0 : unimplemented: Read as ‘0’
21+
1922
writeRegister(MCP23017Register::IOCON, 0b00100000);
2023

2124
//enable all pull up resistors (will be effective for input pins only)

0 commit comments

Comments
 (0)