Chapter 2. API Reference
OPENTHREAD_EVENT_IF_DOWN
OpenThread network interface down
OPENTHREAD_EVENT_GOT_IP6
OpenThread stack added IPv6 address
OPENTHREAD_EVENT_LOST_IP6
OpenThread stack removed IPv6 address
OPENTHREAD_EVENT_MULTICAST_GROUP_JOIN
OpenThread stack joined IPv6 multicast group
OPENTHREAD_EVENT_MULTICAST_GROUP_LEAVE
OpenThread stack left IPv6 multicast group
enum esp_openthread_radio_mode_t
The radio mode of OpenThread.
Values:
RADIO_MODE_NATIVE = 0x0
Use the native 15.4 radio
RADIO_MODE_UART_RCP = 0x1
UART connection to a 15.4 capable radio co-processor (RCP)
RADIO_MODE_SPI_RCP = 0x2
SPI connection to a 15.4 capable radio co-processor (RCP)
enum esp_openthread_host_connection_mode_t
How OpenThread connects to the host.
Values:
HOST_CONNECTION_MODE_NONE = 0x0
Disable host connection
HOST_CONNECTION_MODE_CLI_UART = 0x1
CLI UART connection to the host
HOST_CONNECTION_MODE_RCP_UART = 0x2
RCP UART connection to the host
Header File
•
components/openthread/include/esp_openthread_lock.h
Functions
esp_err_t
esp_openthread_lock_init(void)
This function initializes the OpenThread API lock.
Return
• ESP_OK on success
• ESP_ERR_NO_MEM if allocation has failed
• ESP_ERR_INVALID_STATE if already initialized
void esp_openthread_lock_deinit(void)
This function deinitializes the OpenThread API lock.
bool esp_openthread_lock_acquire(TickType_t block_ticks)
This functions acquires the OpenThread API lock.
Note Every OT APIs that takes an otInstance argument MUST be protected with this API lock except that
the call site is in OT callbacks.
Return
• True on lock acquired
• False on failing to acquire the lock with the timeout.
Espressif Systems
195
Submit Document Feedback
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?