feat(openthread): reorganize source file structure

This commit is contained in:
Xu Si Yu
2026-08-13 12:47:09 +08:00
parent 69de011619
commit f8a1e2a8a9
4 changed files with 109 additions and 15 deletions

View File

@@ -0,0 +1,56 @@
/*
* SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stdbool.h>
#include "openthread/instance.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Initialize OpenThread instance(s) for the selected build (single or multiple).
*
* @return true on success, false otherwise.
*/
bool esp_openthread_instances_init(void);
/**
* @brief Finalize OpenThread instance(s) for the selected build (single or multiple).
*
* @param[in] instance Instance provided by the caller (may be unused in multi-instance builds).
*/
void esp_openthread_instances_deinit(otInstance *instance);
/**
* @brief Check whether tasklets are pending.
*
* @param[in] instance Instance provided by the caller (may be unused in multi-instance builds).
*/
bool esp_openthread_tasklets_are_pending(otInstance *instance);
/**
* @brief Process pending tasklets.
*
* @param[in] instance Instance provided by the caller (may be unused in multi-instance builds).
*/
void esp_openthread_tasklets_process(otInstance *instance);
/**
* @brief Initialize the NCP/RCP application for the selected instance mode.
*
* @param[in] instance Instance provided by the caller (may be unused in multi-instance builds).
*
* @note Only used when CONFIG_OPENTHREAD_RADIO is enabled.
*/
void esp_openthread_ncp_app_init(otInstance *instance);
#ifdef __cplusplus
}
#endif