main/task_wifi.h

changeset 4
d0155c16e992
child 23
2cc30d828d6e
equal deleted inserted replaced
3:e5d91caa6ab4 4:d0155c16e992
1 /**
2 * @file task_wifi.h
3 * @brief WiFi task. Connect to the known AP with the strongest signal.
4 */
5
6 #ifndef _TASK_WIFI_H
7 #define _TASK_WIFI_H
8
9
10 /**
11 * @brief Structure containing the information of the driver task.
12 */
13 typedef struct {
14 bool STA_connected; ///< Connected to AP as station.
15 bool STA_online; ///< Connected and online.
16 char STA_ssid[33]; ///< Connected to this SSID.
17 int8_t STA_rssi; ///< Signal strength.
18 char STA_ip[17]; ///< IP address.
19 char STA_nm[17]; ///< IP netmask.
20 char STA_gw[17]; ///< IP gateway.
21 } WIFI_State;
22
23
24
25 /**
26 * @brief Test if Wifi is ready and connected
27 * @return Return true is connected and we have an IP address.
28 */
29 bool ready_WiFi(void);
30
31
32 /**
33 * @brief Request a WiFi connection.
34 */
35 void request_WiFi(bool connect);
36
37
38 /**
39 * @brief Main task for the wifi_manager
40 * @param pvParameters Parameters for the task.
41 */
42 void task_wifi(void *pvParameters);
43
44
45 #endif

mercurial