mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 15:38:11 +01:00
Fix MCP23x17 not disabling pullup after config change (#2855)
This commit is contained in:
parent
3ac720df47
commit
56870ed4a8
1 changed files with 1 additions and 0 deletions
|
@ -24,6 +24,7 @@ void MCP23X17Base::pin_mode(uint8_t pin, gpio::Flags flags) {
|
||||||
uint8_t gppu = pin < 8 ? mcp23x17_base::MCP23X17_GPPUA : mcp23x17_base::MCP23X17_GPPUB;
|
uint8_t gppu = pin < 8 ? mcp23x17_base::MCP23X17_GPPUA : mcp23x17_base::MCP23X17_GPPUB;
|
||||||
if (flags == gpio::FLAG_INPUT) {
|
if (flags == gpio::FLAG_INPUT) {
|
||||||
this->update_reg(pin, true, iodir);
|
this->update_reg(pin, true, iodir);
|
||||||
|
this->update_reg(pin, false, gppu);
|
||||||
} else if (flags == (gpio::FLAG_INPUT | gpio::FLAG_PULLUP)) {
|
} else if (flags == (gpio::FLAG_INPUT | gpio::FLAG_PULLUP)) {
|
||||||
this->update_reg(pin, true, iodir);
|
this->update_reg(pin, true, iodir);
|
||||||
this->update_reg(pin, true, gppu);
|
this->update_reg(pin, true, gppu);
|
||||||
|
|
Loading…
Reference in a new issue