main/task_wifi.c

changeset 1
ad2c8b13eb88
parent 0
b74b0e4902c3
child 22
90f22a101fc6
--- a/main/task_wifi.c	Sat Oct 20 13:23:15 2018 +0200
+++ b/main/task_wifi.c	Sat Oct 20 17:09:48 2018 +0200
@@ -19,10 +19,10 @@
 WIFI_State			*wifi_state = NULL;		///< Public state for other tasks.
 
 
-uint8_t				_wifi_ssid[33];
-bool				_wifi_ScanAPs = false;
-bool				_wifi_ScanDone = false;
-uint16_t			_wifi_Scanned = 0;
+uint8_t				_wifi_ssid[33];			///< Current SSID
+bool				_wifi_ScanAPs = false;		///< Scanning
+bool				_wifi_ScanDone = false;		///< Scan ready
+uint16_t			_wifi_Scanned = 0;		///< Total scanned APs.
 
 extern int			Main_Screen;			///< Current Screen number.
 extern sButton			Buttons[MAXBUTTONS];		///< Buttons definitions.
@@ -35,7 +35,7 @@
 const int TASK_WIFI_HAS_IP = BIT3;				///< Indicate that we have an IP address
 const int TASK_WIFI_AP_STARTED = BIT4;				///< Indicate that the SoftAP is started
 const int TASK_WIFI_STA_FAILED = BIT5;				///< Indicate that we could not get a connection to AP as station.
-const int TASK_WIFI_STA_DISCONNECTED = BIT6;			///* Indicate that we are disconnected from an ap station.
+const int TASK_WIFI_STA_DISCONNECTED = BIT6;			///< Indicate that we are disconnected from an ap station.
 const int TASK_WIFI_STA_CONNECTED = BIT7;			///< Indicate that we are connected to AP as station, flip of BIT6.
 
 
@@ -53,6 +53,8 @@
 
 /**
  * @brief Local function, WiFi event handler.
+ * @param ctx Context
+ * @param event The event
  * @return Esp error code.
  */
 esp_err_t task_wifi_EventHandler(void *ctx, system_event_t *event);
@@ -263,9 +265,6 @@
 
 
 
-/**
- * @brief WiFi manager task
- */
 void task_wifi( void * pvParameters )
 {
     esp_err_t		ret;
@@ -473,6 +472,9 @@
 }
 
 
+/**
+ * @brief Array with AP security names
+ */
 const char *apsec[] = { "Open", "WEP", "WPA", "WPA2", "WPA WPA2", "Enterprise" };
 
 
@@ -480,7 +482,7 @@
  * @brief Show an AP station as a button. The buttons are already defined.
  * @param idx The index position on the display, 1 to 7.
  * @param ap The AP information from the WiFi scan.
- * @param show, How to display. 0 is blank, 1 is unknown, 2 is known, 3 is a connected AP.
+ * @param show How to display. 0 is blank, 1 is unknown, 2 is known, 3 is a connected AP.
  */
 void Show_AP(uint8_t idx, wifi_ap_record_t ap, int show)
 {

mercurial