]> granicus.if.org Git - esp-idf/commitdiff
esp32/tcpip_adapter: rework according to review comments
authorliuzhifu <liuzhifu@espressif.com>
Wed, 26 Oct 2016 12:02:39 +0000 (20:02 +0800)
committerliuzhifu <liuzhifu@espressif.com>
Wed, 26 Oct 2016 12:02:39 +0000 (20:02 +0800)
1. Modify sta to station in comments
2. Modify esp_wifi_get_ap_num to esp_wifi_scan_get_ap_num
3. Modify esp_wifi_get_ap_list to esp_wifi_scan_get_ap_records

components/esp32/include/esp_wifi.h
components/esp32/include/esp_wifi_types.h
components/esp32/lib
components/tcpip_adapter/include/tcpip_adapter.h

index 3898bfec7996c22f49979571e7718b0c0f6a9d30..6fc9d896acb6a43641fbce08e453ad01ed761165 100644 (file)
@@ -235,19 +235,19 @@ esp_err_t esp_wifi_scan_stop(void);
   * @return    ESP_OK : succeed
   * @return    others : fail
   */
-esp_err_t esp_wifi_get_ap_num(uint16_t *number);
+esp_err_t esp_wifi_scan_get_ap_num(uint16_t *number);
 
 /**
   * @brief     Get AP list found in last scan
   *
-  * @param     uint16_t *number : as input param, it stores max AP number ap_list can hold, as output param, it store
+  * @param     uint16_t *number : as input param, it stores max AP number ap_records can hold, as output param, it store
                                   the actual AP number this API returns
-  * @param     wifi_ap_list_t *ap_list : a list to hold the found APs
+  * @param     wifi_ap_record_t *ap_records: an wifi_ap_record_t array to hold the found APs
   *
   * @return    ESP_OK : succeed
   * @return    others : fail
   */
-esp_err_t esp_wifi_get_ap_list(uint16_t *number, wifi_ap_list_t *ap_list);
+esp_err_t esp_wifi_scan_get_ap_records(uint16_t *number, wifi_ap_record_t *ap_records);
 
 /**
   * @brief     Set current power save type
@@ -471,7 +471,7 @@ esp_err_t esp_wifi_get_config(wifi_interface_t ifx, wifi_config_t *conf);
   *
   * @attention SSC only API
   *
-  * @param     wifi_sta_list_t *sta:  sta list
+  * @param     wifi_sta_list_t *sta:  station list
   *
   * @return    ESP_OK : succeed
   * @return    others : fail
index a607ad9e9482cec0919c73134cecd04fbf282ec7..0ea719a65b603ee23567c1735dd3a001019540b6 100644 (file)
@@ -109,7 +109,7 @@ typedef struct {
     wifi_second_chan_t second;            /**< second channel of AP */
     int8_t  rssi;                         /**< signal strength of AP */
     wifi_auth_mode_t authmode;            /**< authmode of AP */
-} wifi_ap_list_t;
+} wifi_ap_record_t;
 
 typedef enum {
     WIFI_PS_NONE,    /**< No power save */
@@ -154,10 +154,10 @@ typedef struct {
     uint8_t mac[6];  /**< mac address of sta that associated with ESP32 soft-AP */
 }wifi_sta_info_t;
 
-#define ESP_WIFI_MAX_CONN_NUM  8  /**< max number of sta the eSP32 soft-AP can connect */
+#define ESP_WIFI_MAX_CONN_NUM  (8+2)       /**< max number of sta the eSP32 soft-AP can connect */
 typedef struct {
-    wifi_sta_info_t sta[ESP_WIFI_MAX_CONN_NUM+2]; /**< sta list */
-    uint8_t         num; /**< number of sta that associated with ESP32 soft-AP */
+    wifi_sta_info_t sta[ESP_WIFI_MAX_CONN_NUM]; /**< station list */
+    uint8_t         num; /**< number of station that associated with ESP32 soft-AP */
 }wifi_sta_list_t;
 
 typedef enum {
index 0ee0776b539db3e42a06a5b1ff8e4ea102f8630b..02063e8d40f72933622b2eafd78ce968085b0047 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 0ee0776b539db3e42a06a5b1ff8e4ea102f8630b
+Subproject commit 02063e8d40f72933622b2eafd78ce968085b0047
index bbcf33727d0e5ab9413ce459d87be4e8a31ed889..218325320e397aa65090f33fe97a6009c2146e2b 100644 (file)
@@ -363,8 +363,8 @@ wifi_interface_t tcpip_adapter_get_wifi_if(void *dev);
 /**
  * @brief  Get the station information list
  *
- * @param[in]   wifi_sta_list_t *wifi_sta_list: sta list info
- * @param[out]  tcpip_adapter_sta_list_t *tcpip_sta_list: sta list info
+ * @param[in]   wifi_sta_list_t *wifi_sta_list: station list info
+ * @param[out]  tcpip_adapter_sta_list_t *tcpip_sta_list: station list info
  *
  * @return ESP_OK
  *         ESP_ERR_TCPIP_ADAPTER_NO_MEM