CSE_ESPMutex is a Arduino library from CIRCUITSTATE Electronics to create and manage Mutex Variables in the ESP32 platform. It allows you to create mutex variables for shared parallel tasks, gives an intuitive way to acquire and release them. You can use the mutexes to protect the access to any type of variables and prevent race conditions.
This library was developed with the help of AI. Thanks to humanity.
This library is available from the official Arduino Library Manager. Open the Arduino IDE, search for "CSE_ESPMutex" and install the latest version of the library.
Additionally, you can download the latest release package from the GitHub repository and install it manually. To do so, open the Arduino IDE, go to Sketch > Include Library > Add .ZIP Library… and select the downloaded file.
Another method is to clone the GitHub repository directly into your libraries folder. The development branch will have the latest features, bug fixes and other changes. To do so, navigate to your libraries folder (usually located at Documents/Arduino/libraries on Windows and ~/Documents/Arduino/libraries on macOS) and execute the following command:
git clone https://github.com/CIRCUITSTATE/CSE_ESPMutex.git
Git should be installed in your computer.
The library can also be installed via PlatformIO. All officially listed Arduino listed libraries are automatically fetched by PlatformIO. Use the lib_deps search option to install the library.
This library does not have any external dependencies apart from the standard Arduino libraries.
- Basic - Shows how a counter variables is shared between two concurrent tasks.
Please see the API.md file for the API reference.