/* * MTG RFID Companion - Wi-Fi manager (Core 0) * * Phase 5 Step 5.1: Station-mode auto-connect with disconnect event * handling and reconnect back-off. */ #pragma once #include "esp_err.h" #include "freertos/FreeRTOS.h" #ifdef __cplusplus extern "C" { #endif /** * @brief Initialize the Wi-Fi subsystem (netif, driver, events). * @return ESP_OK on success. */ esp_err_t wifi_manager_init(void); /** * @brief Start station mode and attempt to connect to the configured AP. */ esp_err_t wifi_manager_start(void); /** * @brief True if a real SSID is configured (non-empty, not the * `YOUR_...` placeholder). Station mode will actually run. */ bool wifi_manager_sta_configured(void); /** * @brief True if the STA has a valid IP. */ bool wifi_manager_connected(void); /** * @brief Block until connected or timeout. Returns ESP_OK if connected. */ esp_err_t wifi_manager_wait_connected(TickType_t timeout_ticks); #ifdef __cplusplus } #endif