mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-06 22:24:33 +02:00
example common_components: fixed GPIO max range for ESP32-C2
This commit is contained in:
@@ -4,7 +4,7 @@ config ENV_GPIO_RANGE_MIN
|
||||
|
||||
config ENV_GPIO_RANGE_MAX
|
||||
int
|
||||
default 19
|
||||
default 20
|
||||
|
||||
config ENV_GPIO_IN_RANGE_MAX
|
||||
int
|
||||
|
1568
examples/ethernet/basic/sdkconfig_GW_issue
Normal file
1568
examples/ethernet/basic/sdkconfig_GW_issue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
# The following lines of boilerplate have to be in your project's CMakeLists
|
||||
# in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(bridge)
|
||||
|
@@ -13,7 +13,24 @@ Performance of this type of "software" bridge is limited by the performance of E
|
||||
|
||||
You need one ESP32 with at least two Ethernet ports and two PCs (or other Ethernet capable devices). Connect the network as shown in figure below, configure PC#1 as DHCP server and PC#2 as DHCP client.
|
||||
|
||||

|
||||
```mermaid
|
||||
graph TD;
|
||||
classDef classPing fill:#0000,stroke-width:0px;
|
||||
esp32["ESP32 w/ 2 bridged<br/>Ethernet ports<br/>(DHCP Client)"];
|
||||
pc1["PC#1<br/>(DHCP Server)"];
|
||||
pc2["PC#2<br/>(DHCP Client)"];
|
||||
ping1["ping"]:::classPing
|
||||
ping2["ping"]:::classPing
|
||||
ping3["ping"]:::classPing
|
||||
esp32 -.- ping1;
|
||||
ping1 -.- pc1;
|
||||
esp32 == Eth === pc2;
|
||||
esp32 == Eth === pc1;
|
||||
esp32 -.- ping2;
|
||||
ping2 -.- pc2;
|
||||
pc1 <-.- ping3;
|
||||
pc2 <-.- ping3;
|
||||
```
|
||||
|
||||
The work flow of the example is then as follows:
|
||||
|
||||
|
@@ -301,10 +301,11 @@ void app_main(void)
|
||||
.base = &esp_netif_br_config,
|
||||
.stack = ESP_NETIF_NETSTACK_DEFAULT_BR,
|
||||
};
|
||||
// Bridge configuration
|
||||
bridgeif_config_t bridgeif_config = {
|
||||
.max_fdb_dyn_entries = 10,
|
||||
.max_fdb_sta_entries = 2,
|
||||
.max_ports = port_cnt
|
||||
.max_fdb_dyn_entries = 10, // maximum number of address entries in dynamic forwarding database
|
||||
.max_fdb_sta_entries = 2, // maximum number of address entries in static forwarding database
|
||||
.max_ports = port_cnt // maximum number of ports the bridge can consist of
|
||||
};
|
||||
esp_netif_br_config.bridge_info = &bridgeif_config;
|
||||
// Set MAC address of bridge interface the same as the Ethernet interface
|
||||
|
Reference in New Issue
Block a user