Skip to content

Commit

Permalink
Shelly25: Configure GPIO16 as input
Browse files Browse the repository at this point in the history
To avoid conflict with ADE7953's IRQ pin.

Signed-off-by: Deomid "rojer" Ryabkov <[email protected]>
  • Loading branch information
rojer committed Oct 16, 2021
1 parent 2b9adaa commit c8923b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mos.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
author: Shelly-HomeKit contributors
description: A HomeKit firmware for Shelly switches
version: 2.10.0
version: 2.10.1
platform: esp8266

libs_version: latest
Expand Down
6 changes: 6 additions & 0 deletions src/Shelly25/shelly_init_peripherals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ static Status PowerMeterInit(std::vector<std::unique_ptr<PowerMeter>> *pms) {
pms->emplace_back(std::move(pm1));
pms->emplace_back(std::move(pm2));

// GPIO16 is connected to ADE7953's IRQ pin.
// We don't use the functionality but unlike all the other pins
// GPIO16 defaults to output on reset so we reconfigure it as input
// to avoid the conflict.
mgos_gpio_setup_input(16, MGOS_GPIO_PULL_NONE);

return Status::OK();
}

Expand Down

0 comments on commit c8923b3

Please sign in to comment.