From 1cf415a8a97099f3c55339e4ab6f270c1333a439 Mon Sep 17 00:00:00 2001
From: Gunar Schorcht <gunar@schorcht.net>
Date: Mon, 14 Jan 2019 12:13:49 +0100
Subject: [PATCH] cpu/esp32: doc improvements in esp_wifi

---
 cpu/esp32/esp-wifi/doc.txt           | 40 ++++++++++++++++++++++++----
 cpu/esp32/esp-wifi/esp_wifi_netdev.c |  2 +-
 cpu/esp32/esp-wifi/esp_wifi_netdev.h |  2 +-
 cpu/esp32/esp-wifi/esp_wifi_params.h |  3 ++-
 4 files changed, 39 insertions(+), 8 deletions(-)

diff --git a/cpu/esp32/esp-wifi/doc.txt b/cpu/esp32/esp-wifi/doc.txt
index 57b1f56ee0..4081f1c0d9 100644
--- a/cpu/esp32/esp-wifi/doc.txt
+++ b/cpu/esp32/esp-wifi/doc.txt
@@ -7,12 +7,42 @@
  */
 
 /**
- * @defgroup        cpu_esp32_esp_wifi ESP WiFi netdev interface
+ * @defgroup        cpu_esp32_esp_wifi ESP32 WiFi netdev interface
  * @ingroup         cpu_esp32
- * @brief           WiFi AP-based network device driver
- *
- * This module realizes a netdev interface using the built-in
- * WiFi module and AP infrastructure.
+ * @brief           Network device driver for the ESP32 WiFi interface
  *
  * @author      Gunar Schorcht <gunar@schorcht.net>
+
+This module realizes a `netdev` interface for the built-in WiFi interface
+of ESP32. To enable the WiFi interface, module `esp_wifi` has to be used.
+
+@note Due to symbol conflicts with the `crypto` and `hash` modules of RIOT
+in module `esp_idf_wpa_supplicant_crypto`, which is required by module
+`esp_wifi`, `esp_wifi` cannot be used for applications that use these modules.
+Therefore, module `esp_wifi` is not automatically enabled when module
+`netdev_default` is used. Instead, if necessary, the application has to add
+the module `esp_wifi` in the Makefile.
+
+```
+USEMODULE += esp_wifi
+```
+
+Furthermore, the following configuration parameters have to be defined:
+
+Configuration Parameter | Description
+------------------------|------------
+ESP_WIFI_SSID           | SSID of the AP to be used.
+ESP_WIFI_PASS           | Passphrase used for the AP (max. 64 chars).
+ESP_WIFI_STACKSIZE      | Stack size used for the WiFi netdev driver thread.
+
+These configuration parameter definitions, as well as enabling the `esp_wifi`
+module, can be done either in the makefile of the project or at make command
+line, e.g.:
+
+```
+USEMODULE=esp_wifi \
+CFLAGS='-DESP_WIFI_SSID=\"MySSID\" -DESP_WIFI_PASS=\"MyPassphrase\" \
+make -C examples/gnrc_networking BOARD=...
+```
+
  */
diff --git a/cpu/esp32/esp-wifi/esp_wifi_netdev.c b/cpu/esp32/esp-wifi/esp_wifi_netdev.c
index 6af352d3d4..5db81cfbe2 100644
--- a/cpu/esp32/esp-wifi/esp_wifi_netdev.c
+++ b/cpu/esp32/esp-wifi/esp_wifi_netdev.c
@@ -11,7 +11,7 @@
  * @{
  *
  * @file
- * @brief       Netdev interface for the ESP WiFi AP-based communication
+ * @brief       Network device driver for the ESP32 WiFi interface
  *
  * @author      Gunar Schorcht <gunar@schorcht.net>
  */
diff --git a/cpu/esp32/esp-wifi/esp_wifi_netdev.h b/cpu/esp32/esp-wifi/esp_wifi_netdev.h
index a0900c54dd..4a562cfeb0 100644
--- a/cpu/esp32/esp-wifi/esp_wifi_netdev.h
+++ b/cpu/esp32/esp-wifi/esp_wifi_netdev.h
@@ -11,7 +11,7 @@
  * @{
  *
  * @file
- * @brief       Netdev interface for the ESP WiFi AP-based communication
+ * @brief       Network device driver for the ESP32 WiFi interface
  *
  * @author      Gunar Schorcht <gunar@schorcht.net>
  */
diff --git a/cpu/esp32/esp-wifi/esp_wifi_params.h b/cpu/esp32/esp-wifi/esp_wifi_params.h
index e1e9bad492..e6c0c9adfb 100644
--- a/cpu/esp32/esp-wifi/esp_wifi_params.h
+++ b/cpu/esp32/esp-wifi/esp_wifi_params.h
@@ -8,10 +8,11 @@
 
 /**
  * @ingroup     cpu_esp32_esp_wifi
+ * @ingroup     cpu_esp32_conf
  * @{
  *
  * @file
- * @brief       Parameters for the netdev interface for ESP WiFi module
+ * @brief       Parameters for the ESP32 WiFi netdev interface
  *
  * @author      Gunar Schorcht <gunar@schorcht.net>
  */
-- 
GitLab