ethernet: work with cache disabled

add ETH_MAC_FLAG_WORK_WITH_CACHE_DISABLE flag, make ethenret driver
possible to work when cache disabled

Closes https://github.com/espressif/esp-idf/issues/4406
This commit is contained in:
morris
2020-01-13 21:34:23 +08:00
parent 4fb879c11e
commit 5ad0bdd8db
3 changed files with 24 additions and 8 deletions
+4 -2
View File
@@ -24,7 +24,6 @@ extern "C" {
#include "driver/spi_master.h"
#endif
/**
* @brief Ethernet MAC
*
@@ -252,8 +251,11 @@ typedef struct {
uint32_t rx_task_prio; /*!< Priority of the receive task */
int smi_mdc_gpio_num; /*!< SMI MDC GPIO number */
int smi_mdio_gpio_num; /*!< SMI MDIO GPIO number */
uint32_t flags; /*!< Flags that specify extra capability for mac driver */
} eth_mac_config_t;
#define ETH_MAC_FLAG_WORK_WITH_CACHE_DISABLE (1 << 0) /*!< MAC driver can work when cache is disabled */
/**
* @brief Default configuration for Ethernet MAC object
*
@@ -265,6 +267,7 @@ typedef struct {
.rx_task_prio = 15, \
.smi_mdc_gpio_num = 23, \
.smi_mdio_gpio_num = 18, \
.flags = 0, \
}
#if CONFIG_ETH_USE_ESP32_EMAC
@@ -313,7 +316,6 @@ typedef struct {
esp_eth_mac_t *esp_eth_mac_new_dm9051(const eth_dm9051_config_t *dm9051_config, const eth_mac_config_t *mac_config);
#endif
#if CONFIG_ETH_USE_OPENETH
esp_eth_mac_t *esp_eth_mac_new_openeth(const eth_mac_config_t *config);
#endif // CONFIG_ETH_USE_OPENETH