esp_openthread_netif_glue.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. // http://www.apache.org/licenses/LICENSE-2.0
  7. //
  8. // Unless required by applicable law or agreed to in writing, software
  9. // distributed under the License is distributed on an "AS IS" BASIS,
  10. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. // See the License for the specific language governing permissions and
  12. // limitations under the License
  13. #pragma once
  14. #include "esp_err.h"
  15. #include "esp_netif.h"
  16. #include "esp_openthread_types.h"
  17. #include "openthread/instance.h"
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. /**
  22. * @brief This function initializes the OpenThread network interface glue.
  23. *
  24. * @param[in] config The platform configuration.
  25. *
  26. * @return
  27. * - glue pointer on success
  28. * - NULL on failure
  29. *
  30. */
  31. void *esp_openthread_netif_glue_init(const esp_openthread_platform_config_t *config);
  32. /**
  33. * @brief This function deinitializes the OpenThread network interface glue.
  34. *
  35. */
  36. void esp_openthread_netif_glue_deinit(void);
  37. /**
  38. * @brief This function acquires the OpenThread netif.
  39. *
  40. * @return
  41. * The OpenThread netif or NULL if not initialzied.
  42. *
  43. */
  44. esp_netif_t *esp_openthread_get_netif(void);
  45. #ifdef __cplusplus
  46. }
  47. #endif