#include #include "config.h" #include "serled.h" #include "cgiwifi.h" static ETSTimer ledTimer; static void ICACHE_FLASH_ATTR setLed(int on) { int8_t pin = flashConfig.conn_led_pin; if (pin < 0) return; // disabled // LED is active-low if (on) { gpio_output_set(0, (1<= 0) { makeGpio(flashConfig.conn_led_pin); setLed(1); } os_printf("CONN led=%d\n", flashConfig.conn_led_pin); os_timer_disarm(&ledTimer); os_timer_setfn(&ledTimer, ledTimerCb, NULL); os_timer_arm(&ledTimer, 2000, 0); }