Darian Leung 947a4f0908 freertos: Add portTRY_ENTRY_CRITICAL() and deprecate legacy spinlock fucntions
Add TRY_ENTRY_CRITICAL() API to all for timeouts when entering critical sections.
The following port API were added:
- portTRY_ENTER_CRITICAL()
- portTRY_ENTER_CRITICAL_ISR()
- portTRY_ENTER_CRITICAL_SAFE()

Deprecated legacy spinlock API in favor of spinlock.h. The following API were deprecated:
- vPortCPUInitializeMutex()
- vPortCPUAcquireMutex()
- vPortCPUAcquireMutexTimeout()
- vPortCPUReleaseMutex()

Other Changes:
- Added portMUX_INITIALIZE() to replace vPortCPUInitializeMutex()
- The assembly of the critical section functions ends up being about 50 instructions longer,
  thus the spinlock test pass threshold had to be increased to account for the extra runtime.

Closes https://github.com/espressif/esp-idf/issues/5301
2025-09-19 18:51:40 +08:00
2023-06-01 13:55:48 +02:00
2025-08-21 15:32:11 +08:00
2018-02-16 02:40:16 +07:00
2023-06-30 10:17:32 +02:00
2025-05-20 10:33:37 +02:00
2016-09-11 10:16:33 +07:00

ESP32 MQTT Library

GitHub Actions Workflow Status License GitHub contributors

Features

  • Based on: https://github.com/tuanpmt/esp_mqtt
  • Support MQTT over TCP, SSL with mbedtls, MQTT over Websocket, MQTT over Websocket Secure
  • Easy to setup with URI
  • Multiple instances (Multiple clients in one application)
  • Support subscribing, publishing, authentication, will messages, keep alive pings and all 3 QoS levels (it should be a fully functional client).
  • Support for MQTT 3.1.1 and 5.0

How to use

ESP-MQTT is a standard ESP-IDF component. Please refer to instructions in ESP-IDF

Documentation

License

Older IDF verisons

For ESP-IDF versions prior to IDFv3.2, please clone as a component of ESP-IDF:

git submodule add https://github.com/espressif/esp-mqtt.git components/espmqtt

and checkout the ESP-MQTT_FOR_IDF_3.1 tag

Description
Languages
C 88.4%
Python 7.4%
C++ 2.6%
CMake 1.4%
Shell 0.2%