From e49ce1e6d726ba7d3e6f80a9608d80cab316df32 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 6 Dec 2017 13:49:32 +0100 Subject: Add support for arduino-like loop function + blinky on esp8266 --- src/arch/esp8266/driver/gpio.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/arch/esp8266/driver') 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); -- cgit v1.2.3