6 #ifndef _TASK_WIFI_H |
6 #ifndef _TASK_WIFI_H |
7 #define _TASK_WIFI_H |
7 #define _TASK_WIFI_H |
8 |
8 |
9 |
9 |
10 /** |
10 /** |
11 * @brief Defines the maximum number of access points that can be scanned. |
|
12 */ |
|
13 #define MAX_AP_NUM 5 |
|
14 |
|
15 |
|
16 /** |
|
17 * @brief Structure containing the information of the driver task. |
11 * @brief Structure containing the information of the driver task. |
18 */ |
12 */ |
19 typedef struct { |
13 typedef struct { |
20 bool STA_connected; ///< Connected to AP as station. |
14 bool STA_connected; ///< Connected to AP as station. |
21 bool STA_online; ///< Connected and online. |
15 bool STA_online; ///< Connected and online. |
22 char STA_ssid[33]; ///< Connected to this SSID. |
16 char STA_ssid[33]; ///< Connected to this SSID. |
|
17 char STA_bssid[18]; ///< Connected to this BSSID. |
23 int8_t STA_rssi; ///< Signal strength. |
18 int8_t STA_rssi; ///< Signal strength. |
|
19 uint8_t STA_channel; ///< Connected channel. |
24 char STA_ip[17]; ///< IP address. |
20 char STA_ip[17]; ///< IP address. |
25 char STA_nm[17]; ///< IP netmask. |
21 char STA_nm[17]; ///< IP netmask. |
26 char STA_gw[17]; ///< IP gateway. |
22 char STA_gw[17]; ///< IP gateway. |
27 } WIFI_State; |
23 } WIFI_State; |
28 |
24 |
46 */ |
42 */ |
47 void request_WiFi(void); |
43 void request_WiFi(void); |
48 |
44 |
49 |
45 |
50 /** |
46 /** |
|
47 * @brief Request a WiFi scan. |
|
48 */ |
|
49 void scan_WiFi(void); |
|
50 |
|
51 |
|
52 /** |
|
53 * @brief Request WiFi disconnect. |
|
54 */ |
|
55 void disconnect_WiFi(void); |
|
56 |
|
57 |
|
58 /** |
51 * @brief Main task for the wifi_manager |
59 * @brief Main task for the wifi_manager |
52 * @param pvParameters Parameters for the task. |
60 * @param pvParameters Parameters for the task. |
53 */ |
61 */ |
54 void task_wifi(void *pvParameters); |
62 void task_wifi(void *pvParameters); |
55 |
63 |