Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed update of led bug and GPIO16 support #2110

Merged
merged 4 commits into from
Jan 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions code/espurna/config/dependencies.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
#define MQTT_SUPPORT 1
#endif

#if LED_SUPPORT
#undef BROKER_SUPPORT
#define BROKER_SUPPORT 1 // If LED is enabled enable BROKER to supply status changes
#endif

#if INFLUXDB_SUPPORT
#undef BROKER_SUPPORT
Expand Down
5 changes: 3 additions & 2 deletions code/espurna/gpio.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Copyright (C) 2017-2019 by Xose Pérez <xose dot perez at gmail dot com>

#include <bitset>

constexpr const size_t GPIO_PINS = 16;
constexpr const size_t GPIO_PINS = 17;

std::bitset<GPIO_PINS> _gpio_locked;
std::bitset<GPIO_PINS> _gpio_available;
Expand Down Expand Up @@ -59,10 +59,11 @@ void gpioSetup() {
|| (efuse_blocks[2] & (1 << 16))
);

// TODO: GPIO16 is only for basic I/O, gpioGetLock before attachInterrupt should check for that
for (unsigned char pin=0; pin < GPIO_PINS; ++pin) {
if (pin <= 5) _gpio_available.set(pin);
if (((pin == 9) || (pin == 10)) && (esp8285)) _gpio_available.set(pin);
if (12 <= pin && pin <= 15) _gpio_available.set(pin);
if (12 <= pin && pin <= 16) _gpio_available.set(pin);
}

}
1 change: 0 additions & 1 deletion code/espurna/relay.ino
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,6 @@ void _relayProcess(bool mode) {
if (_relay_sync_locked && needs_unlock && changed) {
_relaySyncUnlock();
}

}

#if defined(ITEAD_SONOFF_IFAN02)
Expand Down