Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
06a0e3dc
Commit
06a0e3dc
authored
Jul 22, 2021
by
Johny Mattsson
Browse files
idf4: part 3.2 - fix bug in updated eth module
Updated docs to reflect new WiFi station connect behaviour.
parent
54a41149
Changes
2
Show whitespace changes
Inline
Side-by-side
components/modules/eth.c
View file @
06a0e3dc
...
@@ -220,7 +220,7 @@ static int leth_init( lua_State *L )
...
@@ -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 )
...
@@ -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
;
...
...
docs/modules/wifi.md
View file @
06a0e3dc
...
@@ -186,8 +186,10 @@ wifi.sta.config(station_cfg)
...
@@ -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()`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment