mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
d15a9c2c48
Fixed memory leak in emac_esp_new_dma function. Polished ESP EMAC cache management. Added emac_periph definitions based on SoC features and improved(generalized) ESP EMAC GPIO initialization. Added ESP EMAC GPIO reservation. Added check for frame error condition indicated by EMAC DMA and created a target test.
32 lines
646 B
C
32 lines
646 B
C
/*
|
|
* SPDX-FileCopyrightText: 2019-2024 Espressif Systems (Shanghai) CO LTD
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
#pragma once
|
|
|
|
#include "esp_eth_com.h"
|
|
#include "esp_eth_mac.h"
|
|
#include "sdkconfig.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#if CONFIG_ETH_USE_OPENETH
|
|
/**
|
|
* @brief Create OpenCores Ethernet MAC instance
|
|
*
|
|
* @param config: Ethernet MAC configuration
|
|
*
|
|
* @return
|
|
* - instance: create MAC instance successfully
|
|
* - NULL: create MAC instance failed because some error occurred
|
|
*/
|
|
esp_eth_mac_t *esp_eth_mac_new_openeth(const eth_mac_config_t *config);
|
|
#endif // CONFIG_ETH_USE_OPENETH
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|