Skip to content

Commit 3e851b5

Browse files
authored
[Docs] Added useStaticBuffers function description (espressif#5820)
* docs: Added useStaticBuffers function description * docs: Default useStaticBuffers configuration in highlight
1 parent f410728 commit 3e851b5

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

Diff for: docs/source/api/wifi.rst

+25-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ a Wi-Fi network.
2626
:width: 520
2727
:figclass: align-center
2828

29-
This mode can be used for serving a HTTP or HTTPS server inside the ESP32, for example.
29+
This mode can be used for serving an HTTP or HTTPS server inside the ESP32, for example.
3030

3131
Working as STA
3232
**************
@@ -38,12 +38,34 @@ The STA mode is used to connect the ESP32 to a Wi-Fi network, provided by an Acc
3838
:width: 520
3939
:figclass: align-center
4040

41-
If you need to connect your project to the Internet, this is the mode you are looking for.
41+
This is the mode to be used if you want to connect your project to the Internet.
4242

4343
API Description
4444
---------------
4545

46-
Here is the description about the WiFi API.
46+
Here is the description of the WiFi API.
47+
48+
Common API
49+
----------
50+
51+
Here are the common APIs that are used for both modes, AP and STA.
52+
53+
useStaticBuffers
54+
****************
55+
56+
This function is used to set the memory allocation mode for the Wi-Fi buffers.
57+
58+
.. code-block:: arduino
59+
60+
static void useStaticBuffers(bool bufferMode);
61+
62+
* Set ``true`` to use the Wi-Fi buffers memory allocation as **static**.
63+
* Set ``false`` to set the buffers memory allocation to **dynamic**.
64+
65+
The use of dynamic allocation is recommended to save memory and reduce resources usage. However, the dynamic performs slightly slower than the static allocation.
66+
Use static allocation if you want to have more performance and if your application is multi-tasking.
67+
68+
By default, the memory allocation will be set to **dynamic** if this function is not being used.
4769

4870
WiFiAP
4971
------

0 commit comments

Comments
 (0)