mirror of https://github.com/arendst/Tasmota.git
Merge pull request #10316 from techman83/fix_mcp230xx_input
Only apply mcp230xx_oldoutpincount when USE_MCP230xx_OUTPUT set
This commit is contained in:
commit
ea224a681f
|
@ -196,6 +196,7 @@ void MCP230xx_ApplySettings(void)
|
|||
I2cWrite8(USE_MCP230xx_ADDR, MCP230xx_GPIO+mcp230xx_port, reg_portpins);
|
||||
#endif // USE_MCP230xx_OUTPUT
|
||||
}
|
||||
#ifdef USE_MCP230xx_OUTPUT
|
||||
TasmotaGlobal.devices_present -= mcp230xx_oldoutpincount;
|
||||
mcp230xx_oldoutpincount = 0;
|
||||
for (uint32_t idx=0;idx<mcp230xx_pincount;idx++) {
|
||||
|
@ -206,6 +207,7 @@ void MCP230xx_ApplySettings(void)
|
|||
int_millis[idx]=millis();
|
||||
}
|
||||
TasmotaGlobal.devices_present += mcp230xx_oldoutpincount;
|
||||
#endif // USE_MCP230xx_OUTPUT
|
||||
mcp230xx_int_en = int_en;
|
||||
MCP230xx_CheckForIntCounter(); // update register on whether or not we should be counting interrupts
|
||||
MCP230xx_CheckForIntRetainer(); // update register on whether or not we should be retaining interrupt events for teleperiod
|
||||
|
|
Loading…
Reference in New Issue