Phase 5: Wi-Fi manager w/ reconnect, Scryfall HTTPS client + cJSON caching to /spiffs on net_task (Core 0)
This commit is contained in:
40
main/wifi_manager.h
Normal file
40
main/wifi_manager.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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 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
|
||||
Reference in New Issue
Block a user