mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-06 11:36:59 +03:00
cpp state machine for ethernet
This commit is contained in:
30
components/wifi-manager/network_ethernet.h
Normal file
30
components/wifi-manager/network_ethernet.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include "network_manager.h"
|
||||
#include "accessors.h"
|
||||
#include <string.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);
|
||||
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);
|
||||
|
||||
void destroy_network_ethernet();
|
||||
void init_network_ethernet();
|
||||
bool network_ethernet_wait_for_link(uint16_t max_wait_ms);
|
||||
|
||||
void network_ethernet_start_timer();
|
||||
bool network_ethernet_is_up();
|
||||
bool network_ethernet_enabled();
|
||||
esp_netif_t *network_ethernet_get_interface();
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user