Network manager implemented and relatively stable

This commit is contained in:
Sebastien L
2021-12-10 13:07:27 -05:00
parent 81756a7649
commit 63fbc2f645
66 changed files with 4528 additions and 2679 deletions

View File

@@ -3,19 +3,26 @@
#include "network_manager.h"
#include "accessors.h"
#include <string.h>
#include "esp_netif_defaults.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
bool valid;
eth_config_t eth_config;
esp_eth_mac_t* (*mac_new)(spi_device_handle_t spi_handle, eth_config_t * eth_config);
esp_eth_phy_t *(*phy_new)( eth_config_t* eth_config);
bool rmii;
bool spi;
esp_eth_handle_t handle;
esp_netif_config_t * cfg_netif;
spi_device_interface_config_t * devcfg;
// esp_eth_mac_t* (*mac_new)(spi_device_handle_t spi_handle, eth_config_t * eth_config);
// esp_eth_phy_t *(*phy_new)( eth_config_t* eth_config);
esp_err_t (*start)(spi_device_handle_t spi_handle,eth_config_t *ethernet_config);
void (*init_config)(eth_config_t * eth_config);
} network_ethernet_driver_t;
typedef network_ethernet_driver_t* network_ethernet_detect_func_t(const char* Driver);
network_ethernet_driver_t* network_ethernet_driver_autodetect(const char* Driver);
void destroy_network_ethernet();
void init_network_ethernet();
bool network_ethernet_wait_for_link(uint16_t max_wait_ms);