#pragma once #include "esp_err.h" #ifdef __cplusplus extern "C" { #endif typedef enum { LED_STATE_OFF = 0, LED_STATE_WIFI_CONNECTING, // Flashing Red LED_STATE_WIFI_FAILED, // Solid Red LED_STATE_SERVER_CONNECTING, // Flashing Orange LED_STATE_SERVER_FAILED, // Solid Orange LED_STATE_CONNECTED, // Rainbow Rotate LED_STATE_UPDATING // Pulse Blue slowly (OTA flashing) } led_state_t; // Set the current LED state to update visual indicators void set_led_state(led_state_t state); // Get the current LED state led_state_t get_led_state(void); // Initializes Wi-Fi station mode and starts the connection process esp_err_t wifi_init_sta(void); // Returns true if Wi-Fi is currently connected to the AP with an IP bool wifi_is_connected(void); #ifdef __cplusplus } #endif