mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-01 02:28:28 +02:00
mcp23017: read output latch registers during setup (#3744)
This commit is contained in:
@@ -14,6 +14,9 @@ void MCP23008::setup() {
|
||||
return;
|
||||
}
|
||||
|
||||
// Read current output register state
|
||||
this->read_reg(mcp23x08_base::MCP23X08_OLAT, &this->olat_);
|
||||
|
||||
if (this->open_drain_ints_) {
|
||||
// enable open-drain interrupt pins, 3.3V-safe
|
||||
this->write_reg(mcp23x08_base::MCP23X08_IOCON, 0x04);
|
||||
|
||||
Reference in New Issue
Block a user