idf4: part 3.2 - fix bug in updated eth module
Updated docs to reflect new WiFi station connect behaviour.
This commit is contained in:
parent
54a41149ea
commit
06a0e3dc23
|
@ -220,7 +220,7 @@ static int leth_init( lua_State *L )
|
||||||
|
|
||||||
eth_phy_config_t phy_cfg = ETH_PHY_DEFAULT_CONFIG();
|
eth_phy_config_t phy_cfg = ETH_PHY_DEFAULT_CONFIG();
|
||||||
|
|
||||||
phy_cfg.phy_addr = opt_checkint_range( L, "addr", -1, 0, 31 );
|
phy_cfg.phy_addr = opt_checkint_range( L, "addr", -1, -1, 31 );
|
||||||
phy_cfg.reset_gpio_num =
|
phy_cfg.reset_gpio_num =
|
||||||
opt_checkint_range( L, "power", -1, -1, GPIO_NUM_MAX-1 ); // optional
|
opt_checkint_range( L, "power", -1, -1, GPIO_NUM_MAX-1 ); // optional
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@ static int leth_init( lua_State *L )
|
||||||
esp_netif_config_t netif_cfg = ESP_NETIF_DEFAULT_ETH();
|
esp_netif_config_t netif_cfg = ESP_NETIF_DEFAULT_ETH();
|
||||||
esp_netif_t *new_eth = esp_netif_new(&netif_cfg);
|
esp_netif_t *new_eth = esp_netif_new(&netif_cfg);
|
||||||
|
|
||||||
err = esp_eth_set_default_handlers(eth);
|
err = esp_eth_set_default_handlers(new_eth);
|
||||||
if (err != ESP_OK)
|
if (err != ESP_OK)
|
||||||
goto cleanup_netif;
|
goto cleanup_netif;
|
||||||
|
|
||||||
|
|
|
@ -186,8 +186,10 @@ wifi.sta.config(station_cfg)
|
||||||
## wifi.sta.connect()
|
## wifi.sta.connect()
|
||||||
|
|
||||||
Connects to the configured AP in station mode. You will want to call this
|
Connects to the configured AP in station mode. You will want to call this
|
||||||
on start-up after [`wifi.start()`](#wifistart), and probably also in
|
on start-up after [`wifi.start()`](#wifistart). The system will attempt
|
||||||
response to getting `disconnected` events in order to reconnect.
|
to connect until it succeeds or [`wifi.sta.disconnect()`](#wifistadisconnect)
|
||||||
|
is called. Each failed connect attempt will fire the `disconnected`
|
||||||
|
event.
|
||||||
|
|
||||||
#### Syntax
|
#### Syntax
|
||||||
`wifi.sta.connect()`
|
`wifi.sta.connect()`
|
||||||
|
|
Loading…
Reference in New Issue