No description
Find a file
vortigont 07c510e3ad
fix (NetworkEvents lib) remove checks for duplicated event handlers (#10376)
* lib Network: add cpp syntax to structs

* [Network] deprecate NetworkEvents::removeEvent() for std::function callbacks

removing event callback via std::function pointer does not work as expected for lambdas (issue #10365)
here mark NetworkEvents::removeEvent(NetworkEventFuncCb cbEvent, arduino_event_id_t event = ARDUINO_EVENT_MAX)
as deprecated in favor of removing by callback's id

for NetworkEvents::onEvent remove checking for dublicate event handler, this does not work for lambdas too

remove NetworkEvents::find methods as unnecessary

move cbEventList container inside the class

declare NetworkEventCbList_t as a cpp struct with constructor, allows using std::vector.emplace() when adding new items to container

optimize NetworkEvents::remove() calls to use erase-remove idiom for std::vector

* [Network] hide event task under private member of NetworkEvents class

prevent checkForEvent loop to be callable from outside the task's thread

* refactor(NetworkEvents) code polishing and comments

- rename NetworkEvents::cbEventList as private member NetworkEvents_cbEventList
- NetworkEvents::getStatusBits() add const qualifier
- turn statics into constexpr
- add indexes to enum::arduino_event_id_t to make events indexing consistent for SOCs with/without WiFi
  also leave some index gaps to minimize renumbering on adding new events
- add doxygen help to NetworkEvents:: methods
- declare NetworkEvents::eventName() as static, that could be used without creating class scope
- potential mem leak in postEvent

* refactor(NetworkEvents) add (optional) mutex lock for container operations

provide thread safety for dual core SoCs
since std::mutex brings additional componetns of libstdc++ lib it impacts resulting image size significantly (around 50k)
Might be enabled on-demand if thread-safety is required

* ci(pre-commit): Apply automatic fixes

* fix(spelling): Fix spelling mistakes

---------

Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com>
2024-10-24 15:15:13 +03:00
.github fix(ci): Boards test set fail-fast to false (#10508) 2024-10-23 11:47:50 +03:00
cores/esp32 feat(uart): eliminates nonexistent functions (#10428) 2024-10-07 15:56:04 +03:00
docs ci(json): Add requires_any field and use QIO by default to match IDE (#10472) 2024-10-19 12:00:48 +03:00
idf_component_examples Update Matter Light README.md (#10357) 2024-09-24 18:26:34 +03:00
libraries fix (NetworkEvents lib) remove checks for duplicated event handlers (#10376) 2024-10-24 15:15:13 +03:00
package IDF release/v5.1 (#10320) 2024-09-18 14:52:03 +03:00
tests fix(formatting): Fix formatting and disable JSON hook (#10492) 2024-10-21 18:29:05 +03:00
tools fix(spelling): Fix misspellings detected by codespell and enable it (#10232) 2024-08-28 15:43:02 +03:00
variants Add multiple boards of the Waveshare ESP32-S3-Touch-LCD-1.46 type (#10482) 2024-10-23 15:16:12 +03:00
.clang-format refactor(style): Change some style options (#9526) 2024-04-19 18:16:55 +03:00
.codespellrc fix(spelling): Fix misspellings detected by codespell and enable it (#10232) 2024-08-28 15:43:02 +03:00
.editorconfig ci(json): Add requires_any field and use QIO by default to match IDE (#10472) 2024-10-19 12:00:48 +03:00
.flake8 ci(performance): Add performance tests to CI (#9560) 2024-05-07 13:16:13 +02:00
.gitignore fix(get.py): Remove existing files before extracting (#10247) 2024-08-28 09:54:52 +03:00
.gitmodules v2.0.0 Add support for ESP32S2 and update ESP-IDF to 4.4 (#4996) 2021-04-05 14:23:58 +03:00
.pre-commit-config.yaml fix(formatting): Fix formatting and disable JSON hook (#10492) 2024-10-21 18:29:05 +03:00
.prettierignore Style Checker and Pre-commit hook CI (#9132) 2024-04-15 18:41:51 +03:00
.readthedocs.yaml Removed YML wron file and changed the YAML (#8785) 2023-10-20 16:35:06 +03:00
.vale.ini docs(vale): Enable vale and fix errors (#10231) 2024-08-28 15:48:18 +03:00
boards.txt Add multiple boards of the Waveshare ESP32-S3-Touch-LCD-1.46 type (#10482) 2024-10-23 15:16:12 +03:00
CMakeLists.txt fix(cmake): Use proper name for LittleFS component 2024-10-22 20:40:15 +03:00
CODE_OF_CONDUCT.md fix(spelling): Fix misspellings detected by codespell and enable it (#10232) 2024-08-28 15:43:02 +03:00
idf_component.yml Update esp-insights version (#10456) 2024-10-15 18:06:20 +03:00
Kconfig.projbuild feat(net): Switch to typedefs for WiFiClient, WiFiServer, WiFiUdp and WiFiClientSecure (#9909) 2024-06-24 10:26:22 +03:00
LICENSE.md Refactor repository with pre-commit hooks (#9515) 2024-04-15 19:40:56 +03:00
package.json Update core version to 3.0.5 2024-09-18 14:54:00 +03:00
platform.txt fix(build): Fix sdkconfig copy for Arduino CLI (#10484) 2024-10-18 20:29:14 +03:00
programmers.txt Add support for ArduinoIDE 2.0.0 (#6506) 2022-04-04 17:19:23 +03:00
README.md fix(readme): Update badge for Build status (#10097) 2024-07-31 15:17:11 +03:00

Arduino core for the ESP32, ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6 and ESP32-H2

Build Status External Libraries Test Hardware Tests

Need help or have a question? Join the chat at Gitter or open a new Discussion

Contents

Development Status

Latest Stable Release Release Version Release Date Downloads

Latest Development Release Release Version Release Date Downloads

Development Planning

Our Development is fully tracked on this public Roadmap 🎉

For even more information you can join our Monthly Community Meetings 🔔.

Documentation

You can use the Arduino-ESP32 Online Documentation to get all information about this project.


Migration guide from version 2.x to 3.x is available here.


APIs compatibility with ESP8266 and Arduino-CORE (Arduino.cc) is explained here.


Supported Chips

Here are the ESP32 series supported by the Arduino-ESP32 project:

SoC Stable Development Datasheet
ESP32 Yes Yes ESP32
ESP32-S2 Yes Yes ESP32-S2
ESP32-C3 Yes Yes ESP32-C3
ESP32-S3 Yes Yes ESP32-S3
ESP32-C6 Yes Yes ESP32-C6
ESP32-H2 Yes Yes ESP32-H2

Note

ESP32-C2 is also supported by Arduino-ESP32 but requires rebuilding the static libraries. This is not trivial and requires a good understanding of the ESP-IDF build system. For more information, see the Lib Builder documentation.

For more details visit the supported chips documentation page.

Decoding exceptions

You can use EspExceptionDecoder to get meaningful call trace.

Issue/Bug report template

Before reporting an issue, make sure you've searched for similar one that was already created. Also make sure to go through all the issues labeled as Type: For reference.

Finally, if you are sure no one else had the issue, follow the Issue template or Feature request template while reporting any new Issue.

External libraries compilation test

We have set-up CI testing for external libraries for ESP32 Arduino core. You can check test results in the file LIBRARIES_TEST. For more information and how to add your library to the test see external library testing in the documentation.

Contributing

We welcome contributions to the Arduino ESP32 project!

See contributing in the documentation for more information on how to contribute to the project.

We would like to have this repository in a polite and friendly atmosphere, so please be kind and respectful to others. For more details, look at Code of Conduct.