Select one of the symbols to view example projects that use it.
 
Outline
#include "esp_eth_driver.h"
eth_dev_type_t
eth_dev_info_t
ethernet_init_all(esp_eth_handle_t **, uint8_t *);
ethernet_deinit_all(esp_eth_handle_t *);
ethernet_init_get_dev_info(esp_eth_handle_t *);
Files
loading...
SourceVuESP-IDF Framework and Examplesstatic_ip samplemanaged_components/espressif__ethernet_init/ethernet_init.h
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/* * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 *//* ... */ #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; // MDC gpio of internal ethernet uint8_t eth_internal_mdio; // MDIO gpio of internal ethernet }{ ... }; struct { uint8_t eth_spi_cs; // CS gpio of spi ethernet uint8_t eth_spi_int; // INT gpio of spi ethernet }{ ... }; }{ ... } pin; }{ ... } eth_dev_info_t; /** * @brief Initialize Ethernet driver based on Espressif IoT Development Framework Configuration * * @param[out] eth_handles_out array of initialized Ethernet driver handles * @param[out] eth_cnt_out number of initialized Ethernets * @return * - ESP_OK on success * - ESP_ERR_INVALID_ARG when passed invalid pointers * - ESP_ERR_NO_MEM when there is no memory to allocate for Ethernet driver handles array * - ESP_FAIL on any other failure *//* ... */ esp_err_t ethernet_init_all(esp_eth_handle_t *eth_handles_out[], uint8_t *eth_cnt_out); /** * @brief Deinitialize Ethernet driver *//* ... */ void ethernet_deinit_all(esp_eth_handle_t *eth_handles); /** * @brief Returns the device type of the ethernet handle * * @param[out] eth_handles Initialized Ethernet driver handles * @return * - eth_dev_info_t device information of the ethernet handle *//* ... */ eth_dev_info_t ethernet_init_get_dev_info(esp_eth_handle_t *eth_handle); #ifdef __cplusplus }{...} #endif
Details