network_ethernet.h 804 B

123456789101112131415161718192021222324252627282930
  1. #pragma once
  2. #include "network_manager.h"
  3. #include "accessors.h"
  4. #include <string.h>
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. typedef struct {
  9. bool valid;
  10. eth_config_t eth_config;
  11. esp_eth_mac_t* (*mac_new)(spi_device_handle_t spi_handle, eth_config_t * eth_config);
  12. esp_eth_phy_t *(*phy_new)( eth_config_t* eth_config);
  13. void (*init_config)(eth_config_t * eth_config);
  14. } network_ethernet_driver_t;
  15. typedef network_ethernet_driver_t* network_ethernet_detect_func_t(const char* Driver);
  16. void destroy_network_ethernet();
  17. void init_network_ethernet();
  18. bool network_ethernet_wait_for_link(uint16_t max_wait_ms);
  19. void network_ethernet_start_timer();
  20. bool network_ethernet_is_up();
  21. bool network_ethernet_enabled();
  22. esp_netif_t *network_ethernet_get_interface();
  23. #ifdef __cplusplus
  24. }
  25. #endif