forked from espressif/arduino-esp32
update idf libs, disable WDT on S2, use malloc for PSRAM
This commit is contained in:
@ -132,7 +132,9 @@
|
||||
#define CONFIG_SPIRAM_SIZE -1
|
||||
#define CONFIG_SPIRAM_SPEED_40M 1
|
||||
#define CONFIG_SPIRAM 1
|
||||
#define CONFIG_SPIRAM_USE_CAPS_ALLOC 1
|
||||
#define CONFIG_SPIRAM_USE_MALLOC 1
|
||||
#define CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL 16384
|
||||
#define CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL 32768
|
||||
#define CONFIG_SPIRAM_CACHE_WORKAROUND 1
|
||||
#define CONFIG_SPIRAM_CACHE_WORKAROUND_STRATEGY_MEMW 1
|
||||
#define CONFIG_SPIRAM_BANKSWITCH_ENABLE 1
|
||||
@ -212,9 +214,9 @@
|
||||
#define CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE 1
|
||||
#define CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM 16
|
||||
#define CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM 32
|
||||
#define CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER 1
|
||||
#define CONFIG_ESP32_WIFI_TX_BUFFER_TYPE 1
|
||||
#define CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM 32
|
||||
#define CONFIG_ESP32_WIFI_STATIC_TX_BUFFER 1
|
||||
#define CONFIG_ESP32_WIFI_TX_BUFFER_TYPE 0
|
||||
#define CONFIG_ESP32_WIFI_STATIC_TX_BUFFER_NUM 16
|
||||
#define CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED 1
|
||||
#define CONFIG_ESP32_WIFI_TX_BA_WIN 6
|
||||
#define CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED 1
|
||||
@ -328,6 +330,8 @@
|
||||
#define CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL 1
|
||||
#define CONFIG_MBEDTLS_HARDWARE_AES 1
|
||||
#define CONFIG_MBEDTLS_HAVE_TIME 1
|
||||
#define CONFIG_MBEDTLS_ECDSA_DETERMINISTIC 1
|
||||
#define CONFIG_MBEDTLS_SHA512_C 1
|
||||
#define CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT 1
|
||||
#define CONFIG_MBEDTLS_TLS_SERVER 1
|
||||
#define CONFIG_MBEDTLS_TLS_CLIENT 1
|
||||
@ -378,6 +382,7 @@
|
||||
#define CONFIG_MBEDTLS_ECP_NIST_OPTIM 1
|
||||
#define CONFIG_MDNS_MAX_SERVICES 10
|
||||
#define CONFIG_MDNS_TASK_PRIORITY 1
|
||||
#define CONFIG_MDNS_TASK_STACK_SIZE 4096
|
||||
#define CONFIG_MDNS_TASK_AFFINITY_CPU0 1
|
||||
#define CONFIG_MDNS_TASK_AFFINITY 0x0
|
||||
#define CONFIG_MDNS_SERVICE_ADD_TIMEOUT_MS 2000
|
||||
|
@ -109,6 +109,38 @@ void esp_pm_impl_dump_stats(FILE* out);
|
||||
*/
|
||||
void esp_pm_impl_waiti(void);
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32S2
|
||||
/**
|
||||
* @brief Callback function type for peripherals to skip light sleep.
|
||||
*
|
||||
*/
|
||||
typedef bool (* skip_light_sleep_cb_t)(void);
|
||||
|
||||
/**
|
||||
* @brief Register peripherals skip light sleep callback
|
||||
*
|
||||
* This function allows you to register a callback that gets the result
|
||||
* that if light sleep should be skipped by peripherals.
|
||||
* @param cb function to get the result
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_NO_MEM if no more callback slots are available
|
||||
*/
|
||||
esp_err_t esp_pm_register_skip_light_sleep_callback(skip_light_sleep_cb_t cb);
|
||||
|
||||
/**
|
||||
* @brief Unregisterperipherals skip light sleep callback
|
||||
*
|
||||
* This function allows you to unregister a callback which was previously
|
||||
* registered using esp_register_skip_light_sleep_callback.
|
||||
* @param cb function to get the result
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_STATE if the given callback hasn't been registered before
|
||||
*/
|
||||
esp_err_t esp_pm_unregister_skip_light_sleep_callback(skip_light_sleep_cb_t cb);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM_PROFILING
|
||||
#define WITH_PROFILING
|
||||
#endif
|
||||
|
@ -73,6 +73,30 @@ struct esp_eth_mac_s {
|
||||
*/
|
||||
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
|
||||
*
|
||||
|
@ -511,6 +511,20 @@ bool esp_http_client_is_complete_data_received(esp_http_client_handle_t client);
|
||||
|
||||
int esp_http_client_read_response(esp_http_client_handle_t client, char *buffer, int len);
|
||||
|
||||
/**
|
||||
* @brief Get URL from client
|
||||
*
|
||||
* @param[in] client The esp_http_client handle
|
||||
* @param[inout] url The buffer to store URL
|
||||
* @param[in] len The buffer length
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK
|
||||
* - ESP_FAIL
|
||||
*/
|
||||
|
||||
esp_err_t esp_http_client_get_url(esp_http_client_handle_t client, char *url, const int len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -162,7 +162,7 @@ esp_err_t esp_https_ota_finish(esp_https_ota_handle_t https_ota_handle);
|
||||
esp_err_t esp_https_ota_get_img_desc(esp_https_ota_handle_t https_ota_handle, esp_app_desc_t *new_app_info);
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* @brief This function returns OTA image data read so far.
|
||||
*
|
||||
* @note This API should be called only if `esp_https_ota_perform()` has been called atleast once or
|
||||
|
@ -402,6 +402,22 @@ esp_err_t esp_netif_set_old_ip_info(esp_netif_t *esp_netif, const esp_netif_ip_i
|
||||
*/
|
||||
int esp_netif_get_netif_impl_index(esp_netif_t *esp_netif);
|
||||
|
||||
/**
|
||||
* @brief Get net interface name from network stack implementation
|
||||
*
|
||||
* @note This name could be used in `setsockopt()` to bind socket with appropriate interface
|
||||
*
|
||||
* @param[in] esp_netif Handle to esp-netif instance
|
||||
* @param[out] name Interface name as specified in underlying TCP/IP stack. Note that the
|
||||
* actual name will be copied to the specified buffer, which must be allocated to hold
|
||||
* maximum interface name size (6 characters for lwIP)
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK
|
||||
* - ESP_ERR_ESP_NETIF_INVALID_PARAMS
|
||||
*/
|
||||
esp_err_t esp_netif_get_netif_impl_name(esp_netif_t *esp_netif, char* name);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@ -648,6 +664,17 @@ esp_err_t esp_netif_get_ip6_linklocal(esp_netif_t *esp_netif, esp_ip6_addr_t *if
|
||||
*/
|
||||
esp_err_t esp_netif_get_ip6_global(esp_netif_t *esp_netif, esp_ip6_addr_t *if_ip6);
|
||||
|
||||
/**
|
||||
* @brief Get all IPv6 addresses of the specified interface
|
||||
*
|
||||
* @param[in] esp_netif Handle to esp-netif instance
|
||||
* @param[out] if_ip6 Array of IPv6 addresses will be copied to the argument
|
||||
*
|
||||
* @return
|
||||
* number of returned IPv6 addresses
|
||||
*/
|
||||
int esp_netif_get_all_ip6(esp_netif_t *esp_netif, esp_ip6_addr_t if_ip6[]);
|
||||
|
||||
/**
|
||||
* @brief Sets IPv4 address to the specified octets
|
||||
*
|
||||
|
@ -414,6 +414,17 @@ esp_err_t esp_wifi_internal_get_negotiated_channel(wifi_interface_t ifx, uint8_t
|
||||
*/
|
||||
esp_err_t esp_wifi_internal_get_negotiated_bandwidth(wifi_interface_t ifx, uint8_t aid, uint8_t *bw);
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32S2
|
||||
/**
|
||||
* @brief Check if WiFi TSF is active
|
||||
*
|
||||
* @return
|
||||
* - true: Active
|
||||
* - false: Not active
|
||||
*/
|
||||
bool esp_wifi_internal_is_tsf_active(void);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -57,6 +57,7 @@ typedef enum {
|
||||
WIFI_AUTH_WPA_WPA2_PSK, /**< authenticate mode : WPA_WPA2_PSK */
|
||||
WIFI_AUTH_WPA2_ENTERPRISE, /**< authenticate mode : WPA2_ENTERPRISE */
|
||||
WIFI_AUTH_WPA3_PSK, /**< authenticate mode : WPA3_PSK */
|
||||
WIFI_AUTH_WPA2_WPA3_PSK, /**< authenticate mode : WPA2_WPA3_PSK */
|
||||
WIFI_AUTH_MAX
|
||||
} wifi_auth_mode_t;
|
||||
|
||||
|
@ -235,13 +235,14 @@ typedef QueueHandle_t SemaphoreHandle_t;
|
||||
*
|
||||
* void vATask( void * pvParameters )
|
||||
* {
|
||||
* // Semaphore cannot be used before a call to xSemaphoreCreateBinary().
|
||||
* // Semaphore cannot be used before a call to xSemaphoreCreateBinary() or
|
||||
* // xSemaphoreCreateBinaryStatic().
|
||||
* // The semaphore's data structures will be placed in the xSemaphoreBuffer
|
||||
* // variable, the address of which is passed into the function. The
|
||||
* // function's parameter is not NULL, so the function will not attempt any
|
||||
* // dynamic memory allocation, and therefore the function will not return
|
||||
* // return NULL.
|
||||
* xSemaphore = xSemaphoreCreateBinary( &xSemaphoreBuffer );
|
||||
* xSemaphore = xSemaphoreCreateBinaryStatic( &xSemaphoreBuffer );
|
||||
*
|
||||
* // Rest of task code goes here.
|
||||
* }
|
||||
|
@ -71,23 +71,23 @@
|
||||
#define IDF_PERFORMANCE_MAX_ISR_EXIT_CYCLES 565
|
||||
#endif
|
||||
|
||||
#ifndef IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_MBSEC_TOHOST_4BIT
|
||||
#define IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_MBSEC_TOHOST_4BIT 12200
|
||||
#ifndef IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_KBSEC_TOHOST_4BIT
|
||||
#define IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_KBSEC_TOHOST_4BIT 12200
|
||||
#endif
|
||||
#ifndef IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_MBSEC_FRHOST_4BIT
|
||||
#define IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_MBSEC_FRHOST_4BIT 12200
|
||||
#ifndef IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_KBSEC_FRHOST_4BIT
|
||||
#define IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_KBSEC_FRHOST_4BIT 12200
|
||||
#endif
|
||||
#ifndef IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_MBSEC_TOHOST_1BIT
|
||||
#define IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_MBSEC_TOHOST_1BIT 4000
|
||||
#ifndef IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_KBSEC_TOHOST_1BIT
|
||||
#define IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_KBSEC_TOHOST_1BIT 4000
|
||||
#endif
|
||||
#ifndef IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_MBSEC_FRHOST_1BIT
|
||||
#define IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_MBSEC_FRHOST_1BIT 4000
|
||||
#ifndef IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_KBSEC_FRHOST_1BIT
|
||||
#define IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_KBSEC_FRHOST_1BIT 4000
|
||||
#endif
|
||||
#ifndef IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_MBSEC_TOHOST_SPI
|
||||
#define IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_MBSEC_TOHOST_SPI 1000
|
||||
#ifndef IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_KBSEC_TOHOST_SPI
|
||||
#define IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_KBSEC_TOHOST_SPI 1000
|
||||
#endif
|
||||
#ifndef IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_MBSEC_FRHOST_SPI
|
||||
#define IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_MBSEC_FRHOST_SPI 1000
|
||||
#ifndef IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_KBSEC_FRHOST_SPI
|
||||
#define IDF_PERFORMANCE_MIN_SDIO_THROUGHPUT_KBSEC_FRHOST_SPI 1000
|
||||
#endif
|
||||
|
||||
//time to perform the task selection plus context switch (from task)
|
||||
|
@ -400,7 +400,11 @@
|
||||
*
|
||||
* Comment this macro to disable deterministic ECDSA.
|
||||
*/
|
||||
#ifdef CONFIG_MBEDTLS_ECDSA_DETERMINISTIC
|
||||
#define MBEDTLS_ECDSA_DETERMINISTIC
|
||||
#else
|
||||
#undef MBEDTLS_ECDSA_DETERMINISTIC
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
|
||||
@ -1692,17 +1696,19 @@
|
||||
/**
|
||||
* \def MBEDTLS_HKDF_C
|
||||
*
|
||||
* Disable the HKDF algorithm (RFC 5869).
|
||||
* Enable the HKDF algorithm (RFC 5869).
|
||||
*
|
||||
* Module: library/hkdf.c
|
||||
* Caller:
|
||||
*
|
||||
* Requires: MBEDTLS_MD_C
|
||||
*
|
||||
* This module adds support for the Hashed Message Authentication Code
|
||||
* This module enables support for the Hashed Message Authentication Code
|
||||
* (HMAC)-based key derivation function (HKDF).
|
||||
*/
|
||||
#ifdef MBEDTLS_HKDF_C
|
||||
#ifdef CONFIG_MBEDTLS_HKDF_C
|
||||
#define MBEDTLS_HKDF_C
|
||||
#else
|
||||
#undef MBEDTLS_HKDF_C
|
||||
#endif
|
||||
|
||||
@ -2026,7 +2032,11 @@
|
||||
*
|
||||
* This module adds support for SHA-384 and SHA-512.
|
||||
*/
|
||||
#ifdef CONFIG_MBEDTLS_SHA512_C
|
||||
#define MBEDTLS_SHA512_C
|
||||
#else
|
||||
#undef MBEDTLS_SHA512_C
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SSL_CACHE_C
|
||||
@ -2368,6 +2378,62 @@
|
||||
*/
|
||||
#define MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_KEY_EXCHANGE
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_THREADING_C
|
||||
*
|
||||
* Enable the threading abstraction layer.
|
||||
* By default mbed TLS assumes it is used in a non-threaded environment or that
|
||||
* contexts are not shared between threads. If you do intend to use contexts
|
||||
* between threads, you will need to enable this layer to prevent race
|
||||
* conditions. See also our Knowledge Base article about threading:
|
||||
* https://tls.mbed.org/kb/development/thread-safety-and-multi-threading
|
||||
*
|
||||
* Module: library/threading.c
|
||||
*
|
||||
* This allows different threading implementations (self-implemented or
|
||||
* provided).
|
||||
*
|
||||
* You will have to enable either MBEDTLS_THREADING_ALT or
|
||||
* MBEDTLS_THREADING_PTHREAD.
|
||||
*
|
||||
* Enable this layer to allow use of mutexes within mbed TLS
|
||||
*/
|
||||
#ifdef CONFIG_MBEDTLS_THREADING_C
|
||||
#define MBEDTLS_THREADING_C
|
||||
#else
|
||||
#undef MBEDTLS_THREADING_C
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_THREADING_ALT
|
||||
*
|
||||
* Provide your own alternate threading implementation.
|
||||
*
|
||||
* Requires: MBEDTLS_THREADING_C
|
||||
*
|
||||
* Uncomment this to allow your own alternate threading implementation.
|
||||
*/
|
||||
#ifdef CONFIG_MBEDTLS_THREADING_ALT
|
||||
#define MBEDTLS_THREADING_ALT
|
||||
#else
|
||||
#undef MBEDTLS_THREADING_ALT
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_THREADING_PTHREAD
|
||||
*
|
||||
* Enable the pthread wrapper layer for the threading layer.
|
||||
*
|
||||
* Requires: MBEDTLS_THREADING_C
|
||||
*
|
||||
* Uncomment this to enable pthread mutexes.
|
||||
*/
|
||||
#ifdef CONFIG_MBEDTLS_THREADING_PTHREAD
|
||||
#define MBEDTLS_THREADING_PTHREAD
|
||||
#else
|
||||
#undef MBEDTLS_THREADING_PTHREAD
|
||||
#endif
|
||||
|
||||
/* \} name SECTION: Module configuration options */
|
||||
|
||||
#if defined(TARGET_LIKE_MBED)
|
||||
|
Reference in New Issue
Block a user