1
6
7
8
9
10
11
12
13
14
15
20
21
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
54
55
56
57
64
65
66
67
68
/* ... */
#pragma once
#include "esp_eth_driver.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
ETH_DEV_TYPE_UNKNOWN,
ETH_DEV_TYPE_INTERNAL_ETH,
ETH_DEV_TYPE_SPI,
}{ ... } eth_dev_type_t;
typedef struct {
char name[12];
eth_dev_type_t type;
union {
struct {
uint8_t eth_internal_mdc;
uint8_t eth_internal_mdio;
}{ ... };
struct {
uint8_t eth_spi_cs;
uint8_t eth_spi_int;
}{ ... };
}{ ... } pin;
}{ ... } eth_dev_info_t;
/* ... */
esp_err_t ethernet_init_all(esp_eth_handle_t *eth_handles_out[], uint8_t *eth_cnt_out);
/* ... */
void ethernet_deinit_all(esp_eth_handle_t *eth_handles);
/* ... */
eth_dev_info_t ethernet_init_get_dev_info(esp_eth_handle_t *eth_handle);
#ifdef __cplusplus
}{...}
#endif