Ethernet examples: added new common init for Ethernet drivers

This commit is contained in:
Ondrej Kosta
2022-07-22 17:13:04 +02:00
parent 20e253e663
commit 20e668259e
29 changed files with 501 additions and 1434 deletions

View File

@@ -0,0 +1,29 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
#pragma once
#include "esp_eth_driver.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @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 example_eth_init(esp_eth_handle_t *eth_handles_out[], uint8_t *eth_cnt_out);
#ifdef __cplusplus
}
#endif