From e5a5087e401d3bc2d6968a1d9bcb16e3f29fc35d Mon Sep 17 00:00:00 2001 From: "pedro.minatel" Date: Fri, 29 Oct 2021 10:43:45 +0100 Subject: [PATCH 1/2] docs: Added useStaticBuffers function description --- docs/source/api/wifi.rst | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/docs/source/api/wifi.rst b/docs/source/api/wifi.rst index 9491fc3ca0b..93e3b3d3b76 100644 --- a/docs/source/api/wifi.rst +++ b/docs/source/api/wifi.rst @@ -26,7 +26,7 @@ a Wi-Fi network. :width: 520 :figclass: align-center -This mode can be used for serving a HTTP or HTTPS server inside the ESP32, for example. +This mode can be used for serving an HTTP or HTTPS server inside the ESP32, for example. Working as STA ************** @@ -38,12 +38,34 @@ The STA mode is used to connect the ESP32 to a Wi-Fi network, provided by an Acc :width: 520 :figclass: align-center -If you need to connect your project to the Internet, this is the mode you are looking for. +This is the mode to be used if you want to connect your project to the Internet. API Description --------------- -Here is the description about the WiFi API. +Here is the description of the WiFi API. + +Common API +---------- + +Here are the common APIs that are used for both modes, AP and STA. + +useStaticBuffers +**************** + +This function is used to set the memory allocation mode for the Wi-Fi buffers. + +.. code-block:: arduino + + static void useStaticBuffers(bool bufferMode); + +* Set ``true`` to use the Wi-Fi buffers memory allocation as **static**. +* Set ``false`` to set the buffers memory allocation to **dynamic**. + +The use of dynamic allocation is recommended to save memory and reduce resources usage. However, the dynamic performs slightly slower than the static allocation. +Use static allocation if you want to have more performance and if your application is multi-tasking. + +By default, the memory allocation will be set to *dynamic* if this function is not being used. WiFiAP ------ From 9f8cabd2d27fda0e8a73f76d2b80a40b4e76a21e Mon Sep 17 00:00:00 2001 From: "pedro.minatel" Date: Tue, 2 Nov 2021 11:01:50 +0000 Subject: [PATCH 2/2] docs: Default useStaticBuffers configuration in highlight --- docs/source/api/wifi.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/api/wifi.rst b/docs/source/api/wifi.rst index 93e3b3d3b76..b5214838084 100644 --- a/docs/source/api/wifi.rst +++ b/docs/source/api/wifi.rst @@ -65,7 +65,7 @@ This function is used to set the memory allocation mode for the Wi-Fi buffers. The use of dynamic allocation is recommended to save memory and reduce resources usage. However, the dynamic performs slightly slower than the static allocation. Use static allocation if you want to have more performance and if your application is multi-tasking. -By default, the memory allocation will be set to *dynamic* if this function is not being used. +By default, the memory allocation will be set to **dynamic** if this function is not being used. WiFiAP ------