Skip to content

[Docs] Added useStaticBuffers function description #5820

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions docs/source/api/wifi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
**************
Expand All @@ -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
------
Expand Down