mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-29 05:36:39 +00:00
Update xsns_29_mcp230xx.ino
This commit is contained in:
parent
50f2eb3811
commit
1b714b0320
@ -151,12 +151,12 @@ void MCP230xx_ApplySettings(void) {
|
||||
|
||||
void MCP230xx_Detect()
|
||||
{
|
||||
uint8_t buffer;
|
||||
|
||||
if (mcp230xx_type) {
|
||||
return;
|
||||
}
|
||||
|
||||
uint8_t buffer;
|
||||
|
||||
for (byte i = 0; i < sizeof(mcp230xx_addresses); i++) {
|
||||
mcp230xx_address = mcp230xx_addresses[i];
|
||||
I2cWrite8(mcp230xx_address, MCP230xx_IOCON, 0x80); // attempt to set bank mode - this will only work on MCP23017, so its the best way to detect the different chips 23008 vs 23017
|
||||
|
Loading…
x
Reference in New Issue
Block a user