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
6477f5f3
Commit
6477f5f3
authored
May 22, 2015
by
dnc40085
Browse files
added wifi.getchannel
parent
fc8fa2cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/modules/wifi.c
View file @
6477f5f3
...
...
@@ -163,12 +163,33 @@ static int wifi_getmode( lua_State* L )
lua_pushinteger
(
L
,
mode
);
return
1
;
}
/**
* wifi.getchannel()
* Description:
* Get current wifi Channel
*
* Syntax:
* wifi.getchannel()
* Parameters:
* nil
*
* Returns:
* Current wifi channel
*/
static
int
wifi_getchannel
(
lua_State
*
L
)
{
unsigned
channel
;
channel
=
(
unsigned
)
wifi_get_channel
();
lua_pushinteger
(
L
,
channel
);
return
1
;
}
/**
* wifi.setphymode()
* Description:
* Set wifi physical mode
��
802.11 b/g/n
��
* Note
��
SoftAP only supports 802.11 b/g.
* Set wifi physical mode
(
802.11 b/g/n
)
* Note
:
SoftAP only supports 802.11 b/g.
* Syntax:
* wifi.setphymode(mode)
* Parameters:
...
...
@@ -197,7 +218,7 @@ static int wifi_setphymode( lua_State* L )
/**
* wifi.getphymode()
* Description:
* Get wifi physical mode
��
802.11 b/g/n
��
* Get wifi physical mode
(
802.11 b/g/n
)
* Syntax:
* wifi.getphymode()
* Parameters:
...
...
@@ -1014,6 +1035,7 @@ const LUA_REG_TYPE wifi_map[] =
{
{
LSTRKEY
(
"setmode"
),
LFUNCVAL
(
wifi_setmode
)
},
{
LSTRKEY
(
"getmode"
),
LFUNCVAL
(
wifi_getmode
)
},
{
LSTRKEY
(
"getchannel"
),
LFUNCVAL
(
wifi_getchannel
)
},
{
LSTRKEY
(
"setphymode"
),
LFUNCVAL
(
wifi_setphymode
)
},
{
LSTRKEY
(
"getphymode"
),
LFUNCVAL
(
wifi_getphymode
)
},
{
LSTRKEY
(
"startsmart"
),
LFUNCVAL
(
wifi_start_smart
)
},
...
...
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