All configuration is now done exclusively through mimi_secrets.h at build time. Removed NVS read/write logic, CLI config commands (wifi_set, set_tg_token, set_api_key, set_model, set_proxy, clear_proxy, set_search_key), and setter functions from all modules. CLI retains debug/maintenance commands only. Updated all documentation to reflect the change. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
42 lines
959 B
C
42 lines
959 B
C
#pragma once
|
|
|
|
#include "esp_err.h"
|
|
#include "esp_event.h"
|
|
#include "freertos/FreeRTOS.h"
|
|
#include "freertos/event_groups.h"
|
|
|
|
#define WIFI_CONNECTED_BIT BIT0
|
|
#define WIFI_FAIL_BIT BIT1
|
|
|
|
/**
|
|
* Initialize WiFi subsystem (STA mode).
|
|
*/
|
|
esp_err_t wifi_manager_init(void);
|
|
|
|
/**
|
|
* Start WiFi connection. Non-blocking, fires events.
|
|
*/
|
|
esp_err_t wifi_manager_start(void);
|
|
|
|
/**
|
|
* Block until WiFi is connected or failed.
|
|
* @param timeout_ms Max time to wait (portMAX_DELAY for forever)
|
|
* @return ESP_OK if connected, ESP_ERR_TIMEOUT otherwise
|
|
*/
|
|
esp_err_t wifi_manager_wait_connected(uint32_t timeout_ms);
|
|
|
|
/**
|
|
* Check if WiFi is currently connected.
|
|
*/
|
|
bool wifi_manager_is_connected(void);
|
|
|
|
/**
|
|
* Get the current IP address string (or "0.0.0.0" if not connected).
|
|
*/
|
|
const char *wifi_manager_get_ip(void);
|
|
|
|
/**
|
|
* Get the event group for WiFi state (WIFI_CONNECTED_BIT / WIFI_FAIL_BIT).
|
|
*/
|
|
EventGroupHandle_t wifi_manager_get_event_group(void);
|