main/task_wifi.h

Tue, 11 Apr 2023 19:41:53 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Tue, 11 Apr 2023 19:41:53 +0200
changeset 23
2cc30d828d6e
parent 4
d0155c16e992
permissions
-rw-r--r--

Shorter delays during wifi connect timeout. Some code cleanup in the main state table. Report WiFi TX power during init. Removed SSID from WIFI_State because it wasn't used.

/**
 * @file task_wifi.h
 * @brief WiFi task. Connect to the known AP with the strongest signal.
 */

#ifndef _TASK_WIFI_H
#define _TASK_WIFI_H


/**
 * @brief Structure containing the information of the driver task.
 */
typedef struct {
    bool		STA_connected;		///< Connected to AP as station.
    bool		STA_online;		///< Connected and online.
    int8_t		STA_rssi;		///< Signal strength.
    char		STA_ip[17];		///< IP address.
    char		STA_nm[17];		///< IP netmask.
    char		STA_gw[17];		///< IP gateway.
} WIFI_State;



/**
 * @brief Test if Wifi is ready and connected
 * @return Return true is connected and we have an IP address.
 */
bool ready_WiFi(void);


/**
 * @brief Request a WiFi connection.
 */
void request_WiFi(bool connect);


/**
 * @brief Main task for the wifi_manager
 * @param pvParameters Parameters for the task.
 */
void task_wifi(void *pvParameters);


#endif

mercurial