EasyManuals Logo

Espressif ESP32-S2 User Manual

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #845 background imageLoading...
Page #845 background image
Chapter 2. API Reference
Parameters
cfg: The pthread config parameters
esp_err_t esp_pthread_get_cfg(esp_pthread_cfg_t *p)
Get current pthread creation configuration.
This will retrieve the current configuration that will be used for creating threads.
Return
ESP_OK if the configuration was available
ESP_ERR_NOT_FOUND if a configuration wasnt previously set
Parameters
p: Pointer to the pthread config structure that will be updated with the currently configured param-
eters
esp_err_t esp_pthread_init(void)
Initialize pthread library.
Structures
struct esp_pthread_cfg_t
pthread configuration structure that influences pthread creation
Public Members
size_t stack_size
The stack size of the pthread.
size_t prio
The threads priority.
bool inherit_cfg
Inherit this configuration further.
const char *thread_name
The thread name.
int pin_to_core
The core id to pin the thread to. Has the same value range as xCoreId argument of xTaskCreatePinned-
ToCore.
Macros
PTHREAD_STACK_MIN
2.6.9 Event Loop Library
Overview
The event loop library allows components to declare events to which other components can register handlers code
which will execute when those events occur. This allows loosely coupled components to attach desired behavior to
changes in state of other components without application involvement. For instance, a high level connection handling
library may subscribe to events produced by the wifi subsystem directly and act on those events. This also simplifies
event processing by serializing and deferring code execution to another context.
Using esp_event APIs
There are two objects of concern for users of this library: events and event loops.
Events are occurrences of note. For example, for WiFi, a successful connection to the access point may be an event.
Events are referenced using a two part identier which are discussed more here. Event loops are the vehicle by which
Espressif Systems 834
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish