Posix Threads Support - Espressif ESP32-S2 Programming Manual

Table of Contents

Advertisement

Chapter 2. API Reference
• [in] https_ota_handle: pointer to esp_https_ota_handle_t structure
Structures
struct esp_https_ota_config_t
ESP HTTPS OTA configuration.
Public Members
const
esp_http_client_config_t
ESP HTTP client configuration
http_client_init_cb_t
Callback after ESP HTTP client is initialised
bool bulk_flash_erase
Erase entire flash partition during initialization. By default flash partition is erased during write operation
and in chunk of 4K sector size
bool partial_http_download
Enable Firmware image to be downloaded over multiple HTTP requests
int max_http_request_size
Maximum request size for partial HTTP download
Macros
ESP_ERR_HTTPS_OTA_BASE
ESP_ERR_HTTPS_OTA_IN_PROGRESS
Type Definitions
typedef void *esp_https_ota_handle_t
typedef
esp_err_t
(*http_client_init_cb_t)(esp_http_client_handle_t)

2.6.8 POSIX Threads Support

Overview
ESP-IDF is based on FreeRTOS but offers a range of POSIX-compatible APIs that allow easy porting of third party
code. This includes support for common parts of the POSIX Threads "pthreads"API.
POSIX Threads are implemented in ESP-IDF as wrappers around equivalent FreeRTOS features. The runtime
memory or performance overhead of using the pthreads API is quite low, but not every feature available in either
pthreads or FreeRTOS is available via the ESP-IDF pthreads support.
Pthreads can be used in ESP-IDF by including standard pthread.h header, which is included in the toolchain libc.
An additional ESP-IDF specific header, esp_pthread.h, provides additional non-POSIX APIs for using some
ESP-IDF features with pthreads.
C++ Standard Library implementations for std::thread, std::mutex, std::condition_variable,
etc. are implemented using pthreads (via GCC libstdc++). Therefore, restrictions mentioned here also apply to the
equivalent C++ standard library functionality.
RTOS Integration
Unlike many operating systems using POSIX Threads, ESP-IDF is a real-time operating system with a real-time
scheduler. This means that a thread will only stop running if a higher priority task is ready to run, the thread blocks
on an OS synchronization structure like a mutex, or the thread calls any of the functions sleep, vTaskDelay(),
or usleep.
Espressif Systems
*http_config
http_client_init_cb
Submit Document Feedback
830
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF