mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-04 14:26:31 +02:00
IDF release/v4.0 e7ac221b4
This commit is contained in:
@ -35,7 +35,7 @@ compiler.S.flags=-c -g3 -x assembler-with-cpp -MMD -mlongcalls
|
|||||||
|
|
||||||
compiler.c.elf.cmd=xtensa-esp32-elf-gcc
|
compiler.c.elf.cmd=xtensa-esp32-elf-gcc
|
||||||
compiler.c.elf.flags=-nostdlib "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" -T esp32_out.ld -T esp32.project.ld -T esp32.peripherals.ld -T esp32.rom.ld -T esp32.rom.libgcc.ld -T esp32.rom.syscalls.ld -T esp32.rom.newlib-data.ld -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority -u call_user_start_cpu0 -u __cxa_guard_dummy -u ld_include_panic_highint_hdl -u newlib_include_locks_impl -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -fno-rtti -mfix-esp32-psram-cache-issue
|
compiler.c.elf.flags=-nostdlib "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" -T esp32_out.ld -T esp32.project.ld -T esp32.peripherals.ld -T esp32.rom.ld -T esp32.rom.libgcc.ld -T esp32.rom.syscalls.ld -T esp32.rom.newlib-data.ld -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority -u call_user_start_cpu0 -u __cxa_guard_dummy -u ld_include_panic_highint_hdl -u newlib_include_locks_impl -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -fno-rtti -mfix-esp32-psram-cache-issue
|
||||||
compiler.c.elf.libs=-lgcc -lesp_event -lvfs -lmqtt -ldriver -lcoexist -lsoc -lxtensa -lwear_levelling -lprotobuf-c -lconsole -ldl -lespcoredump -lesp32 -lfb_gfx -lesp_local_ctrl -lulp -lesp_gdbstub -ltcpip_adapter -lopenssl -lbtdm_app -lesp_adc_cal -lmesh -lspiffs -lesp_common -lesp_websocket_client -lsdmmc -lapp_update -lesp_ringbuf -lesp_http_server -lspi_flash -lpp -lhal -lespnow -lbt -lexpat -lmdns -lesp_wifi -lfatfs -lesp-tls -ljsmn -lesp32-camera -lfreemodbus -llog -lwifi_provisioning -lunity -llwip -ljson -lwpa_supplicant -lcxx -lbootloader_support -lesp_rom -lface_recognition -lesp_https_ota -lface_detection -lphy -lm -lnghttp -lcoap -lnet80211 -llibsodium -lfr -lfd -lefuse -ltcp_transport -lmbedtls -lheap -lcore -lpthread -lprotocomm -lasio -lnvs_flash -lapp_trace -lnewlib -lod -lsmartconfig -lesp_http_client -lfreertos -limage_util -lrtc -lesp_eth -lc -lstdc++
|
compiler.c.elf.libs=-lgcc -lesp_ringbuf -lfatfs -lcore -lesp_websocket_client -lspiffs -lconsole -lbtdm_app -lnet80211 -lfd -lasio -lheap -lvfs -ljson -lesp_http_client -lesp_event -lnewlib -lesp_gdbstub -lapp_update -llog -lesp32 -lesp_rom -lesp_eth -lfb_gfx -lod -lcoap -lsdmmc -lface_detection -limage_util -lphy -lopenssl -lesp_adc_cal -lface_recognition -lprotocomm -llwip -lspi_flash -lxtensa -ltcp_transport -ldl -lesp_wifi -lwear_levelling -lpp -lfr -lpthread -lrtc -lcoexist -lsmartconfig -lbootloader_support -lwpa_supplicant -lsoc -lefuse -lmqtt -lwifi_provisioning -lfreemodbus -lunity -lesp_https_ota -lcxx -lmdns -lbt -lhal -lespcoredump -ltcpip_adapter -lesp_common -lfreertos -lesp_local_ctrl -llibsodium -lexpat -lmesh -lespnow -lnvs_flash -lesp32-camera -lprotobuf-c -lnghttp -lapp_trace -ljsmn -ldriver -lm -lulp -lmbedtls -lesp-tls -lesp_http_server -lc -lstdc++
|
||||||
|
|
||||||
compiler.as.cmd=xtensa-esp32-elf-as
|
compiler.as.cmd=xtensa-esp32-elf-as
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ env.Append(
|
|||||||
],
|
],
|
||||||
|
|
||||||
LIBS=[
|
LIBS=[
|
||||||
"-lgcc", "-lesp_event", "-lvfs", "-lmqtt", "-ldriver", "-lcoexist", "-lsoc", "-lxtensa", "-lwear_levelling", "-lprotobuf-c", "-lconsole", "-ldl", "-lespcoredump", "-lesp32", "-lfb_gfx", "-lesp_local_ctrl", "-lulp", "-lesp_gdbstub", "-ltcpip_adapter", "-lopenssl", "-lbtdm_app", "-lesp_adc_cal", "-lmesh", "-lspiffs", "-lesp_common", "-lesp_websocket_client", "-lsdmmc", "-lapp_update", "-lesp_ringbuf", "-lesp_http_server", "-lspi_flash", "-lpp", "-lhal", "-lespnow", "-lbt", "-lexpat", "-lmdns", "-lesp_wifi", "-lfatfs", "-lesp-tls", "-ljsmn", "-lesp32-camera", "-lfreemodbus", "-llog", "-lwifi_provisioning", "-lunity", "-llwip", "-ljson", "-lwpa_supplicant", "-lcxx", "-lbootloader_support", "-lesp_rom", "-lface_recognition", "-lesp_https_ota", "-lface_detection", "-lphy", "-lm", "-lnghttp", "-lcoap", "-lnet80211", "-llibsodium", "-lfr", "-lfd", "-lefuse", "-ltcp_transport", "-lmbedtls", "-lheap", "-lcore", "-lpthread", "-lprotocomm", "-lasio", "-lnvs_flash", "-lapp_trace", "-lnewlib", "-lod", "-lsmartconfig", "-lesp_http_client", "-lfreertos", "-limage_util", "-lrtc", "-lesp_eth", "-lc", "-lstdc++"
|
"-lgcc", "-lesp_ringbuf", "-lfatfs", "-lcore", "-lesp_websocket_client", "-lspiffs", "-lconsole", "-lbtdm_app", "-lnet80211", "-lfd", "-lasio", "-lheap", "-lvfs", "-ljson", "-lesp_http_client", "-lesp_event", "-lnewlib", "-lesp_gdbstub", "-lapp_update", "-llog", "-lesp32", "-lesp_rom", "-lesp_eth", "-lfb_gfx", "-lod", "-lcoap", "-lsdmmc", "-lface_detection", "-limage_util", "-lphy", "-lopenssl", "-lesp_adc_cal", "-lface_recognition", "-lprotocomm", "-llwip", "-lspi_flash", "-lxtensa", "-ltcp_transport", "-ldl", "-lesp_wifi", "-lwear_levelling", "-lpp", "-lfr", "-lpthread", "-lrtc", "-lcoexist", "-lsmartconfig", "-lbootloader_support", "-lwpa_supplicant", "-lsoc", "-lefuse", "-lmqtt", "-lwifi_provisioning", "-lfreemodbus", "-lunity", "-lesp_https_ota", "-lcxx", "-lmdns", "-lbt", "-lhal", "-lespcoredump", "-ltcpip_adapter", "-lesp_common", "-lfreertos", "-lesp_local_ctrl", "-llibsodium", "-lexpat", "-lmesh", "-lespnow", "-lnvs_flash", "-lesp32-camera", "-lprotobuf-c", "-lnghttp", "-lapp_trace", "-ljsmn", "-ldriver", "-lm", "-lulp", "-lmbedtls", "-lesp-tls", "-lesp_http_server", "-lc", "-lstdc++"
|
||||||
],
|
],
|
||||||
|
|
||||||
LIBSOURCE_DIRS=[
|
LIBSOURCE_DIRS=[
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -373,6 +373,9 @@
|
|||||||
#define CONFIG_PTHREAD_TASK_NAME_DEFAULT "pthread"
|
#define CONFIG_PTHREAD_TASK_NAME_DEFAULT "pthread"
|
||||||
#define CONFIG_SPI_FLASH_ROM_DRIVER_PATCH 1
|
#define CONFIG_SPI_FLASH_ROM_DRIVER_PATCH 1
|
||||||
#define CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS 1
|
#define CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS 1
|
||||||
|
#define CONFIG_SPI_FLASH_YIELD_DURING_ERASE 1
|
||||||
|
#define CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS 20
|
||||||
|
#define CONFIG_SPI_FLASH_ERASE_YIELD_TICKS 1
|
||||||
#define CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP 1
|
#define CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP 1
|
||||||
#define CONFIG_SPI_FLASH_SUPPORT_GD_CHIP 1
|
#define CONFIG_SPI_FLASH_SUPPORT_GD_CHIP 1
|
||||||
#define CONFIG_SPIFFS_MAX_PARTITIONS 3
|
#define CONFIG_SPIFFS_MAX_PARTITIONS 3
|
||||||
@ -2186,5 +2189,5 @@
|
|||||||
#define CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP
|
#define CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CONFIG_ARDUINO_IDF_COMMIT "4c81978a3"
|
#define CONFIG_ARDUINO_IDF_COMMIT "e7ac221b4"
|
||||||
#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.0"
|
#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.0"
|
||||||
|
@ -21,6 +21,7 @@ extern "C" {
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
|
#include "driver/gpio.h"
|
||||||
#include "soc/dac_periph.h"
|
#include "soc/dac_periph.h"
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -101,7 +101,7 @@ esp_err_t sigmadelta_set_prescale(sigmadelta_channel_t channel, uint8_t prescale
|
|||||||
*/
|
*/
|
||||||
esp_err_t sigmadelta_set_pin(sigmadelta_channel_t channel, gpio_num_t gpio_num);
|
esp_err_t sigmadelta_set_pin(sigmadelta_channel_t channel, gpio_num_t gpio_num);
|
||||||
|
|
||||||
#ifdef _cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ extern "C" {
|
|||||||
/** Minor version number (x.X.x) */
|
/** Minor version number (x.X.x) */
|
||||||
#define ESP_IDF_VERSION_MINOR 0
|
#define ESP_IDF_VERSION_MINOR 0
|
||||||
/** Patch version number (x.x.X) */
|
/** Patch version number (x.x.X) */
|
||||||
#define ESP_IDF_VERSION_PATCH 0
|
#define ESP_IDF_VERSION_PATCH 1
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Macro to convert IDF version number into an integer
|
* Macro to convert IDF version number into an integer
|
||||||
|
@ -73,6 +73,30 @@ struct esp_eth_mac_s {
|
|||||||
*/
|
*/
|
||||||
esp_err_t (*deinit)(esp_eth_mac_t *mac);
|
esp_err_t (*deinit)(esp_eth_mac_t *mac);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Start Ethernet MAC
|
||||||
|
*
|
||||||
|
* @param[in] mac: Ethernet MAC instance
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* - ESP_OK: start Ethernet MAC successfully
|
||||||
|
* - ESP_FAIL: start Ethernet MAC failed because some other error occurred
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
esp_err_t (*start)(esp_eth_mac_t *mac);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Stop Ethernet MAC
|
||||||
|
*
|
||||||
|
* @param[in] mac: Ethernet MAC instance
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* - ESP_OK: stop Ethernet MAC successfully
|
||||||
|
* - ESP_FAIL: stop Ethernet MAC failed because some error occurred
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
esp_err_t (*stop)(esp_eth_mac_t *mac);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Transmit packet from Ethernet MAC
|
* @brief Transmit packet from Ethernet MAC
|
||||||
*
|
*
|
||||||
@ -251,6 +275,7 @@ typedef struct {
|
|||||||
} eth_mac_config_t;
|
} eth_mac_config_t;
|
||||||
|
|
||||||
#define ETH_MAC_FLAG_WORK_WITH_CACHE_DISABLE (1 << 0) /*!< MAC driver can work when cache is disabled */
|
#define ETH_MAC_FLAG_WORK_WITH_CACHE_DISABLE (1 << 0) /*!< MAC driver can work when cache is disabled */
|
||||||
|
#define ETH_MAC_FLAG_PIN_TO_CORE (1 << 1) /*!< Pin MAC task to the CPU core where driver installation happened */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Default configuration for Ethernet MAC object
|
* @brief Default configuration for Ethernet MAC object
|
||||||
|
@ -805,6 +805,21 @@ esp_err_t esp_wifi_get_config(wifi_interface_t interface, wifi_config_t *conf);
|
|||||||
*/
|
*/
|
||||||
esp_err_t esp_wifi_ap_get_sta_list(wifi_sta_list_t *sta);
|
esp_err_t esp_wifi_ap_get_sta_list(wifi_sta_list_t *sta);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get AID of STA connected with soft-AP
|
||||||
|
*
|
||||||
|
* @param mac STA's mac address
|
||||||
|
* @param[out] aid Store the AID corresponding to STA mac
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* - ESP_OK: succeed
|
||||||
|
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
|
||||||
|
* - ESP_ERR_INVALID_ARG: invalid argument
|
||||||
|
* - ESP_ERR_NOT_FOUND: Requested resource not found
|
||||||
|
* - ESP_ERR_WIFI_MODE: WiFi mode is wrong
|
||||||
|
* - ESP_ERR_WIFI_CONN: WiFi internal error, the station/soft-AP control block is invalid
|
||||||
|
*/
|
||||||
|
esp_err_t esp_wifi_ap_get_sta_aid(const uint8_t mac[6], uint16_t *aid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set the WiFi API configuration storage type
|
* @brief Set the WiFi API configuration storage type
|
||||||
@ -861,20 +876,51 @@ esp_err_t esp_wifi_set_vendor_ie(bool enable, wifi_vendor_ie_type_t type, wifi_v
|
|||||||
esp_err_t esp_wifi_set_vendor_ie_cb(esp_vendor_ie_cb_t cb, void *ctx);
|
esp_err_t esp_wifi_set_vendor_ie_cb(esp_vendor_ie_cb_t cb, void *ctx);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set maximum WiFi transmitting power
|
* @brief Set maximum transmitting power after WiFi start.
|
||||||
*
|
*
|
||||||
* @param power Maximum WiFi transmitting power, unit is 0.25dBm, range is [40, 82] corresponding to 10dBm - 20.5dBm here.
|
* @attention 1. Maximum power before wifi startup is limited by PHY init data bin.
|
||||||
|
* @attention 2. The value set by this API will be mapped to the max_tx_power of the structure wifi_country_t variable.
|
||||||
|
* @attention 3. Mapping Table {Power, max_tx_power} = {{8, 2}, {20, 5}, {28, 7}, {34, 8}, {44, 11},
|
||||||
|
* {52, 13}, {56, 14}, {60, 15}, {66, 16}, {72, 18}, {78, 20}}.
|
||||||
|
* @attention 4. Param power unit is 0.25dBm, range is [8, 78] corresponding to 2dBm - 20dBm.
|
||||||
|
* @attention 5. Relationship between set value and actual value. As follows:
|
||||||
|
* +------------+--------------+
|
||||||
|
* | set value | actual value |
|
||||||
|
* +============+==============+
|
||||||
|
* | [8, 19] | 8 |
|
||||||
|
* +------------+--------------+
|
||||||
|
* | [20, 27] | 20 |
|
||||||
|
* +------------+--------------+
|
||||||
|
* | [28, 33] | 28 |
|
||||||
|
* +------------+--------------+
|
||||||
|
* | [34, 43] | 34 |
|
||||||
|
* +------------+--------------+
|
||||||
|
* | [44, 51] | 44 |
|
||||||
|
* +------------+--------------+
|
||||||
|
* | [52, 55] | 52 |
|
||||||
|
* +------------+--------------+
|
||||||
|
* | [56, 59] | 56 |
|
||||||
|
* +------------+--------------+
|
||||||
|
* | [60, 65] | 60 |
|
||||||
|
* +------------+--------------+
|
||||||
|
* | [66, 71] | 66 |
|
||||||
|
* +------------+--------------+
|
||||||
|
* | [72, 77] | 72 |
|
||||||
|
* +------------+--------------+
|
||||||
|
* | 78 | 78 |
|
||||||
|
* +------------+--------------+
|
||||||
|
* @param power Maximum WiFi transmitting power.
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
* - ESP_OK: succeed
|
* - ESP_OK: succeed
|
||||||
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
|
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
|
||||||
* - ESP_ERR_WIFI_NOT_START: WiFi is not started by esp_wifi_start
|
* - ESP_ERR_WIFI_NOT_START: WiFi is not started by esp_wifi_start
|
||||||
* - ESP_ERR_WIFI_NOT_ARG: invalid argument
|
* - ESP_ERR_WIFI_ARG: invalid argument, e.g. parameter is out of range
|
||||||
*/
|
*/
|
||||||
esp_err_t esp_wifi_set_max_tx_power(int8_t power);
|
esp_err_t esp_wifi_set_max_tx_power(int8_t power);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get maximum WiFi transmiting power
|
* @brief Get maximum transmiting power after WiFi start
|
||||||
*
|
*
|
||||||
* @param power Maximum WiFi transmitting power, unit is 0.25dBm.
|
* @param power Maximum WiFi transmitting power, unit is 0.25dBm.
|
||||||
*
|
*
|
||||||
@ -882,7 +928,7 @@ esp_err_t esp_wifi_set_max_tx_power(int8_t power);
|
|||||||
* - ESP_OK: succeed
|
* - ESP_OK: succeed
|
||||||
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
|
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
|
||||||
* - ESP_ERR_WIFI_NOT_START: WiFi is not started by esp_wifi_start
|
* - ESP_ERR_WIFI_NOT_START: WiFi is not started by esp_wifi_start
|
||||||
* - ESP_ERR_INVALID_ARG: invalid argument
|
* - ESP_ERR_WIFI_ARG: invalid argument
|
||||||
*/
|
*/
|
||||||
esp_err_t esp_wifi_get_max_tx_power(int8_t *power);
|
esp_err_t esp_wifi_get_max_tx_power(int8_t *power);
|
||||||
|
|
||||||
|
@ -94,6 +94,7 @@ typedef enum {
|
|||||||
WIFI_REASON_ASSOC_FAIL = 203,
|
WIFI_REASON_ASSOC_FAIL = 203,
|
||||||
WIFI_REASON_HANDSHAKE_TIMEOUT = 204,
|
WIFI_REASON_HANDSHAKE_TIMEOUT = 204,
|
||||||
WIFI_REASON_CONNECTION_FAIL = 205,
|
WIFI_REASON_CONNECTION_FAIL = 205,
|
||||||
|
WIFI_REASON_AUTH_CHANGED = 206,
|
||||||
} wifi_err_reason_t;
|
} wifi_err_reason_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@ -115,7 +116,7 @@ typedef struct {
|
|||||||
} wifi_active_scan_time_t;
|
} wifi_active_scan_time_t;
|
||||||
|
|
||||||
/** @brief Aggregate of active & passive scan time per channel */
|
/** @brief Aggregate of active & passive scan time per channel */
|
||||||
typedef union {
|
typedef struct {
|
||||||
wifi_active_scan_time_t active; /**< active scan time per channel, units: millisecond. */
|
wifi_active_scan_time_t active; /**< active scan time per channel, units: millisecond. */
|
||||||
uint32_t passive; /**< passive scan time per channel, units: millisecond, values above 1500ms may
|
uint32_t passive; /**< passive scan time per channel, units: millisecond, values above 1500ms may
|
||||||
cause station to disconnect from AP and are not recommended. */
|
cause station to disconnect from AP and are not recommended. */
|
||||||
|
@ -538,6 +538,11 @@
|
|||||||
*/
|
*/
|
||||||
#define LWIP_TCP_KEEPALIVE 1
|
#define LWIP_TCP_KEEPALIVE 1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LWIP_SO_LINGER==1: Enable SO_LINGER processing.
|
||||||
|
*/
|
||||||
|
#define LWIP_SO_LINGER CONFIG_LWIP_SO_LINGER
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing.
|
* LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing.
|
||||||
*/
|
*/
|
||||||
|
@ -37,6 +37,7 @@ typedef struct esp_mqtt_client *esp_mqtt_client_handle_t;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
MQTT_EVENT_ANY = -1,
|
||||||
MQTT_EVENT_ERROR = 0, /*!< on error event, additional context: connection return code, error handle from esp_tls (if supported) */
|
MQTT_EVENT_ERROR = 0, /*!< on error event, additional context: connection return code, error handle from esp_tls (if supported) */
|
||||||
MQTT_EVENT_CONNECTED, /*!< connected event, additional context: session_present flag */
|
MQTT_EVENT_CONNECTED, /*!< connected event, additional context: session_present flag */
|
||||||
MQTT_EVENT_DISCONNECTED, /*!< disconnected event */
|
MQTT_EVENT_DISCONNECTED, /*!< disconnected event */
|
||||||
@ -88,6 +89,15 @@ typedef enum {
|
|||||||
MQTT_TRANSPORT_OVER_WSS /*!< MQTT over Websocket Secure, using scheme: ``wss`` */
|
MQTT_TRANSPORT_OVER_WSS /*!< MQTT over Websocket Secure, using scheme: ``wss`` */
|
||||||
} esp_mqtt_transport_t;
|
} esp_mqtt_transport_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MQTT protocol version used for connection
|
||||||
|
*/
|
||||||
|
typedef enum {
|
||||||
|
MQTT_PROTOCOL_UNDEFINED = 0,
|
||||||
|
MQTT_PROTOCOL_V_3_1,
|
||||||
|
MQTT_PROTOCOL_V_3_1_1
|
||||||
|
} esp_mqtt_protocol_ver_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief MQTT error code structure to be passed as a contextual information into ERROR event
|
* @brief MQTT error code structure to be passed as a contextual information into ERROR event
|
||||||
*
|
*
|
||||||
@ -155,7 +165,7 @@ typedef struct {
|
|||||||
void *user_context; /*!< pass user context to this option, then can receive that context in ``event->user_context`` */
|
void *user_context; /*!< pass user context to this option, then can receive that context in ``event->user_context`` */
|
||||||
int task_prio; /*!< MQTT task priority, default is 5, can be changed in ``make menuconfig`` */
|
int task_prio; /*!< MQTT task priority, default is 5, can be changed in ``make menuconfig`` */
|
||||||
int task_stack; /*!< MQTT task stack size, default is 6144 bytes, can be changed in ``make menuconfig`` */
|
int task_stack; /*!< MQTT task stack size, default is 6144 bytes, can be changed in ``make menuconfig`` */
|
||||||
int buffer_size; /*!< size of MQTT send/receive buffer, default is 1024 */
|
int buffer_size; /*!< size of MQTT send/receive buffer, default is 1024 (only receive buffer size if ``out_buffer_size`` defined) */
|
||||||
const char *cert_pem; /*!< Pointer to certificate data in PEM or DER format for server verify (with SSL), default is NULL, not required to verify the server. PEM-format must have a terminating NULL-character. DER-format requires the length to be passed in cert_len. */
|
const char *cert_pem; /*!< Pointer to certificate data in PEM or DER format for server verify (with SSL), default is NULL, not required to verify the server. PEM-format must have a terminating NULL-character. DER-format requires the length to be passed in cert_len. */
|
||||||
size_t cert_len; /*!< Length of the buffer pointed to by cert_pem. May be 0 for null-terminated pem */
|
size_t cert_len; /*!< Length of the buffer pointed to by cert_pem. May be 0 for null-terminated pem */
|
||||||
const char *client_cert_pem; /*!< Pointer to certificate data in PEM or DER format for SSL mutual authentication, default is NULL, not required if mutual authentication is not needed. If it is not NULL, also `client_key_pem` has to be provided. PEM-format must have a terminating NULL-character. DER-format requires the length to be passed in client_cert_len. */
|
const char *client_cert_pem; /*!< Pointer to certificate data in PEM or DER format for SSL mutual authentication, default is NULL, not required if mutual authentication is not needed. If it is not NULL, also `client_key_pem` has to be provided. PEM-format must have a terminating NULL-character. DER-format requires the length to be passed in client_cert_len. */
|
||||||
@ -170,6 +180,8 @@ typedef struct {
|
|||||||
const char **alpn_protos; /*!< NULL-terminated list of supported application protocols to be used for ALPN */
|
const char **alpn_protos; /*!< NULL-terminated list of supported application protocols to be used for ALPN */
|
||||||
const char *clientkey_password; /*!< Client key decryption password string */
|
const char *clientkey_password; /*!< Client key decryption password string */
|
||||||
int clientkey_password_len; /*!< String length of the password pointed to by clientkey_password */
|
int clientkey_password_len; /*!< String length of the password pointed to by clientkey_password */
|
||||||
|
esp_mqtt_protocol_ver_t protocol_ver; /*!< MQTT protocol version used for connection, defaults to value from menuconfig*/
|
||||||
|
int out_buffer_size; /*!< size of MQTT output buffer. If not defined, both output and input buffers have the same size defined as ``buffer_size`` */
|
||||||
} esp_mqtt_client_config_t;
|
} esp_mqtt_client_config_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -213,6 +225,15 @@ esp_err_t esp_mqtt_client_start(esp_mqtt_client_handle_t client);
|
|||||||
*/
|
*/
|
||||||
esp_err_t esp_mqtt_client_reconnect(esp_mqtt_client_handle_t client);
|
esp_err_t esp_mqtt_client_reconnect(esp_mqtt_client_handle_t client);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This api is typically used to force disconnection from the broker
|
||||||
|
*
|
||||||
|
* @param client mqtt client handle
|
||||||
|
*
|
||||||
|
* @return ESP_OK on success
|
||||||
|
*/
|
||||||
|
esp_err_t esp_mqtt_client_disconnect(esp_mqtt_client_handle_t client);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Stops mqtt client tasks
|
* @brief Stops mqtt client tasks
|
||||||
*
|
*
|
||||||
@ -261,6 +282,9 @@ int esp_mqtt_client_unsubscribe(esp_mqtt_client_handle_t client, const char *top
|
|||||||
* @brief Client to send a publish message to the broker
|
* @brief Client to send a publish message to the broker
|
||||||
*
|
*
|
||||||
* Notes:
|
* Notes:
|
||||||
|
* - This API might block for several seconds, either due to network timeout (10s)
|
||||||
|
* or if publishing payloads longer than internal buffer (due to message
|
||||||
|
* fragmentation)
|
||||||
* - Client doesn't have to be connected to send publish message
|
* - Client doesn't have to be connected to send publish message
|
||||||
* (although it would drop all qos=0 messages, qos>1 messages would be enqueued)
|
* (although it would drop all qos=0 messages, qos>1 messages would be enqueued)
|
||||||
* - It is thread safe, please refer to `esp_mqtt_client_subscribe` for details
|
* - It is thread safe, please refer to `esp_mqtt_client_subscribe` for details
|
||||||
|
@ -8,7 +8,10 @@
|
|||||||
|
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
|
|
||||||
#define MQTT_PROTOCOL_311 CONFIG_MQTT_PROTOCOL_311
|
#ifdef CONFIG_MQTT_PROTOCOL_311
|
||||||
|
#define MQTT_PROTOCOL_311
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MQTT_RECON_DEFAULT_MS (10*1000)
|
#define MQTT_RECON_DEFAULT_MS (10*1000)
|
||||||
#define MQTT_POLL_READ_TIMEOUT_MS (1000)
|
#define MQTT_POLL_READ_TIMEOUT_MS (1000)
|
||||||
|
|
||||||
@ -24,7 +27,12 @@
|
|||||||
#define MQTT_MAX_PASSWORD_LEN 65
|
#define MQTT_MAX_PASSWORD_LEN 65
|
||||||
#define MQTT_MAX_LWT_TOPIC 32
|
#define MQTT_MAX_LWT_TOPIC 32
|
||||||
#define MQTT_MAX_LWT_MSG 128
|
#define MQTT_MAX_LWT_MSG 128
|
||||||
|
|
||||||
|
#if CONFIG_MQTT_TASK_PRIORITY
|
||||||
|
#define MQTT_TASK_PRIORITY CONFIG_MQTT_TASK_PRIORITY
|
||||||
|
#else
|
||||||
#define MQTT_TASK_PRIORITY 5
|
#define MQTT_TASK_PRIORITY 5
|
||||||
|
#endif
|
||||||
|
|
||||||
#if CONFIG_MQTT_TASK_STACK_SIZE
|
#if CONFIG_MQTT_TASK_STACK_SIZE
|
||||||
#define MQTT_TASK_STACK CONFIG_MQTT_TASK_STACK_SIZE
|
#define MQTT_TASK_STACK CONFIG_MQTT_TASK_STACK_SIZE
|
||||||
|
@ -20,6 +20,7 @@ typedef enum ws_transport_opcodes {
|
|||||||
WS_TRANSPORT_OPCODES_CLOSE = 0x08,
|
WS_TRANSPORT_OPCODES_CLOSE = 0x08,
|
||||||
WS_TRANSPORT_OPCODES_PING = 0x09,
|
WS_TRANSPORT_OPCODES_PING = 0x09,
|
||||||
WS_TRANSPORT_OPCODES_PONG = 0x0a,
|
WS_TRANSPORT_OPCODES_PONG = 0x0a,
|
||||||
|
WS_TRANSPORT_OPCODES_FIN = 0x80,
|
||||||
} ws_transport_opcodes_t;
|
} ws_transport_opcodes_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -495,6 +495,7 @@ CONFIG_LWIP_LOCAL_HOSTNAME="espressif"
|
|||||||
CONFIG_LWIP_TIMERS_ONDEMAND=y
|
CONFIG_LWIP_TIMERS_ONDEMAND=y
|
||||||
CONFIG_LWIP_MAX_SOCKETS=10
|
CONFIG_LWIP_MAX_SOCKETS=10
|
||||||
# CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set
|
# CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set
|
||||||
|
# CONFIG_LWIP_SO_LINGER is not set
|
||||||
CONFIG_LWIP_SO_REUSE=y
|
CONFIG_LWIP_SO_REUSE=y
|
||||||
CONFIG_LWIP_SO_REUSE_RXTOALL=y
|
CONFIG_LWIP_SO_REUSE_RXTOALL=y
|
||||||
CONFIG_LWIP_SO_RCVBUF=y
|
CONFIG_LWIP_SO_RCVBUF=y
|
||||||
@ -652,6 +653,10 @@ CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS=y
|
|||||||
# CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set
|
# CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set
|
||||||
# CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set
|
# CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set
|
||||||
# CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set
|
# CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set
|
||||||
|
# CONFIG_SPI_FLASH_BYPASS_BLOCK_ERASE is not set
|
||||||
|
CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y
|
||||||
|
CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=20
|
||||||
|
CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=1
|
||||||
CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y
|
CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y
|
||||||
CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y
|
CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y
|
||||||
CONFIG_SPIFFS_MAX_PARTITIONS=3
|
CONFIG_SPIFFS_MAX_PARTITIONS=3
|
||||||
@ -692,6 +697,7 @@ CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16
|
|||||||
CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30
|
CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30
|
||||||
CONFIG_WPA_MBEDTLS_CRYPTO=y
|
CONFIG_WPA_MBEDTLS_CRYPTO=y
|
||||||
# CONFIG_WPA_TLS_V12 is not set
|
# CONFIG_WPA_TLS_V12 is not set
|
||||||
|
# CONFIG_WPA_WPS_WARS is not set
|
||||||
# CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set
|
# CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set
|
||||||
|
|
||||||
# Deprecated options for backward compatibility
|
# Deprecated options for backward compatibility
|
||||||
|
Reference in New Issue
Block a user