Răsfoiți Sursa

Docs/esp_netif: Make WiFi AP docs available only if enabled

Prepare support for ESP8684
David Cermak 4 ani în urmă
părinte
comite
264d00fc64
1 a modificat fișierele cu 16 adăugiri și 4 ștergeri
  1. 16 4
      docs/en/api-reference/network/esp_netif.rst

+ 16 - 4
docs/en/api-reference/network/esp_netif.rst

@@ -227,26 +227,38 @@ ESP-NETIF programmer's manual
 
 
 Please refer to the example section for basic initialization of default interfaces:
 Please refer to the example section for basic initialization of default interfaces:
 
 
+
 - WiFi Station: :example_file:`wifi/getting_started/station/main/station_example_main.c`
 - WiFi Station: :example_file:`wifi/getting_started/station/main/station_example_main.c`
-- WiFi Access Point: :example_file:`wifi/getting_started/softAP/main/softap_example_main.c`
+
 - Ethernet: :example_file:`ethernet/basic/main/ethernet_example_main.c`
 - Ethernet: :example_file:`ethernet/basic/main/ethernet_example_main.c`
 
 
+.. only:: CONFIG_ESP_WIFI_SOFTAP_SUPPORT
+
+    - WiFi Access Point: :example_file:`wifi/getting_started/softAP/main/softap_example_main.c`
+
 For more specific cases please consult this guide: :doc:`/api-reference/network/esp_netif_driver`.
 For more specific cases please consult this guide: :doc:`/api-reference/network/esp_netif_driver`.
 
 
 
 
 WiFi default initialization
 WiFi default initialization
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 
-The initialization code as well as registering event handlers for default interfaces, such as softAP and station, are provided in two separate APIs to facilitate simple startup code for most applications:
+The initialization code as well as registering event handlers for default interfaces, such as softAP and station, are provided in separate APIs to facilitate simple startup code for most applications:
 
 
-* :cpp:func:`esp_netif_create_default_wifi_ap()`
 * :cpp:func:`esp_netif_create_default_wifi_sta()`
 * :cpp:func:`esp_netif_create_default_wifi_sta()`
 
 
+.. only:: CONFIG_ESP_WIFI_SOFTAP_SUPPORT
+
+    * :cpp:func:`esp_netif_create_default_wifi_ap()`
+
 Please note that these functions return the ``esp_netif`` handle, i.e. a pointer to a network interface object allocated and configured with default settings, which as a consequence, means that:
 Please note that these functions return the ``esp_netif`` handle, i.e. a pointer to a network interface object allocated and configured with default settings, which as a consequence, means that:
 
 
 * The created object has to be destroyed if a network de-initialization is provided by an application using :cpp:func:`esp_netif_destroy_default_wifi()`.
 * The created object has to be destroyed if a network de-initialization is provided by an application using :cpp:func:`esp_netif_destroy_default_wifi()`.
+
 * These *default* interfaces must not be created multiple times, unless the created handle is deleted using :cpp:func:`esp_netif_destroy()`.
 * These *default* interfaces must not be created multiple times, unless the created handle is deleted using :cpp:func:`esp_netif_destroy()`.
-* When using Wifi in ``AP+STA`` mode, both these interfaces has to be created.
+
+.. only:: CONFIG_ESP_WIFI_SOFTAP_SUPPORT
+
+    * When using Wifi in ``AP+STA`` mode, both these interfaces has to be created.
 
 
 
 
 API Reference
 API Reference