summaryrefslogtreecommitdiff
path: root/src/arch/esp8266/driver/gpio.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/esp8266/driver/gpio.cc')
-rw-r--r--src/arch/esp8266/driver/gpio.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/esp8266/driver/gpio.cc b/src/arch/esp8266/driver/gpio.cc
index bc236a9..6e995fc 100644
--- a/src/arch/esp8266/driver/gpio.cc
+++ b/src/arch/esp8266/driver/gpio.cc
@@ -30,7 +30,7 @@ void ICACHE_FLASH_ATTR GPIO::led_off(unsigned char id)
void ICACHE_FLASH_ATTR GPIO::led_toggle(unsigned char id)
{
- if (GPIO_REG_READ(GPIO_OUT_ADDRESS) & BIT2) {
+ if (gpio_input_get() & BIT2) {
led_on(0);
} else {
led_off(0);