mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-19 14:26:01 -04:00
feat(esp_eth): add opencores ethernet support for ESP32-C3 (QEMU) target
This commit is contained in:
parent
52bca70b1a
commit
3e9d2155eb
@ -44,7 +44,8 @@ if(CONFIG_ETH_ENABLED)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ETH_USE_OPENETH)
|
||||
list(APPEND srcs "src/esp_eth_mac_openeth.c")
|
||||
list(APPEND srcs "src/esp_eth_mac_openeth.c"
|
||||
"src/esp_eth_phy_dp83848.c")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
24
components/esp_eth/src/esp_openeth.h
Normal file
24
components/esp_eth/src/esp_openeth.h
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "sdkconfig.h"
|
||||
#include "soc/interrupts.h"
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32C3
|
||||
|
||||
/**
|
||||
* @brief Since ESP32-C3 target in QEMU doesn't support Wifi, re-use its interrupt source for ethernet
|
||||
*/
|
||||
#define ETS_ETH_MAC_INTR_SOURCE ETS_WIFI_MAC_INTR_SOURCE
|
||||
|
||||
|
||||
/**
|
||||
* @brief Use an empty I/O range for the ethernet registers
|
||||
*/
|
||||
#define DR_REG_EMAC_BASE 0x600CD000
|
||||
|
||||
#endif // CONFIG_IDF_TARGET_ESP32C3
|
@ -10,6 +10,7 @@
|
||||
#include <assert.h>
|
||||
#include "sdkconfig.h"
|
||||
#include "soc/soc.h"
|
||||
#include "esp_openeth.h"
|
||||
#include "esp_assert.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Loading…
Reference in New Issue
Block a user