1 // Copyright 2021 Espressif Systems (Shanghai) CO LTD 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License 14 15 #pragma once 16 17 #include "esp_err.h" 18 #include "esp_netif.h" 19 #include "esp_openthread_types.h" 20 #include "openthread/instance.h" 21 22 #ifdef __cplusplus 23 extern "C" { 24 #endif 25 26 /** 27 * @brief This function initializes the OpenThread network interface glue. 28 * 29 * @param[in] config The platform configuration. 30 * 31 * @return 32 * - glue pointer on success 33 * - NULL on failure 34 * 35 */ 36 void *esp_openthread_netif_glue_init(const esp_openthread_platform_config_t *config); 37 38 /** 39 * @brief This function deinitializes the OpenThread network interface glue. 40 * 41 */ 42 void esp_openthread_netif_glue_deinit(void); 43 44 /** 45 * @brief This function acquires the OpenThread netif. 46 * 47 * @return 48 * The OpenThread netif or NULL if not initialzied. 49 * 50 */ 51 esp_netif_t *esp_openthread_get_netif(void); 52 53 #ifdef __cplusplus 54 } 55 #endif 56