esp_eth_netif_glue.h 932 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * SPDX-FileCopyrightText: 2019-2021 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #pragma once
  7. #include "esp_eth_driver.h"
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. /**
  12. * @brief Handle of netif glue - an intermediate layer between netif and Ethernet driver
  13. *
  14. */
  15. typedef struct esp_eth_netif_glue_t* esp_eth_netif_glue_handle_t;
  16. /**
  17. * @brief Create a netif glue for Ethernet driver
  18. * @note netif glue is used to attach io driver to TCP/IP netif
  19. *
  20. * @param eth_hdl Ethernet driver handle
  21. * @return glue object, which inherits esp_netif_driver_base_t
  22. */
  23. esp_eth_netif_glue_handle_t esp_eth_new_netif_glue(esp_eth_handle_t eth_hdl);
  24. /**
  25. * @brief Delete netif glue of Ethernet driver
  26. *
  27. * @param eth_netif_glue netif glue
  28. * @return -ESP_OK: delete netif glue successfully
  29. */
  30. esp_err_t esp_eth_del_netif_glue(esp_eth_netif_glue_handle_t eth_netif_glue);
  31. #ifdef __cplusplus
  32. }
  33. #endif