feat(openthread): optimize trel reception

This commit is contained in:
Xu Si Yu
2025-06-24 18:47:43 +08:00
parent d8d15f0491
commit 8142a4d318
7 changed files with 164 additions and 73 deletions
@@ -0,0 +1,15 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stdatomic.h>
typedef struct {
uint8_t head;
uint8_t tail;
atomic_uint_fast8_t used;
} esp_openthread_circular_queue_info_t;
@@ -84,6 +84,27 @@ void esp_openthread_set_coex_config(esp_ieee802154_coex_config_t config);
*
*/
esp_ieee802154_coex_config_t esp_openthread_get_coex_config(void);
/**
* @brief This function updates the TREL fds and timeouts to the main loop.
*
* @param[inout] mainloop The main loop context.
*
*/
void esp_openthread_trel_update(esp_openthread_mainloop_context_t *mainloop);
/**
* @brief This function performs the OpenThread TREL process.
*
* @param[in] instance The OpenThread instance.
* @param[in] mainloop The main loop context.
*
* @return
* - ESP_OK on success
* - ESP_FAIL on failure
*
*/
esp_err_t esp_openthread_trel_process(otInstance *aInstance, const esp_openthread_mainloop_context_t *mainloop);
#endif
#ifdef __cplusplus