added wifi.getchannel
This commit is contained in:
parent
fc8fa2cc91
commit
6477f5f389
|
@ -163,12 +163,33 @@ static int wifi_getmode( lua_State* L )
|
||||||
lua_pushinteger( L, mode );
|
lua_pushinteger( L, mode );
|
||||||
return 1;
|
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()
|
* wifi.setphymode()
|
||||||
* Description:
|
* Description:
|
||||||
* Set wifi physical mode<EFBFBD><EFBFBD>802.11 b/g/n<EFBFBD><EFBFBD>
|
* Set wifi physical mode(802.11 b/g/n)
|
||||||
* Note<EFBFBD><EFBFBD> SoftAP only supports 802.11 b/g.
|
* Note: SoftAP only supports 802.11 b/g.
|
||||||
* Syntax:
|
* Syntax:
|
||||||
* wifi.setphymode(mode)
|
* wifi.setphymode(mode)
|
||||||
* Parameters:
|
* Parameters:
|
||||||
|
@ -197,7 +218,7 @@ static int wifi_setphymode( lua_State* L )
|
||||||
/**
|
/**
|
||||||
* wifi.getphymode()
|
* wifi.getphymode()
|
||||||
* Description:
|
* Description:
|
||||||
* Get wifi physical mode<EFBFBD><EFBFBD>802.11 b/g/n<EFBFBD><EFBFBD>
|
* Get wifi physical mode(802.11 b/g/n)
|
||||||
* Syntax:
|
* Syntax:
|
||||||
* wifi.getphymode()
|
* wifi.getphymode()
|
||||||
* Parameters:
|
* Parameters:
|
||||||
|
@ -1014,6 +1035,7 @@ const LUA_REG_TYPE wifi_map[] =
|
||||||
{
|
{
|
||||||
{ LSTRKEY( "setmode" ), LFUNCVAL( wifi_setmode ) },
|
{ LSTRKEY( "setmode" ), LFUNCVAL( wifi_setmode ) },
|
||||||
{ LSTRKEY( "getmode" ), LFUNCVAL( wifi_getmode ) },
|
{ LSTRKEY( "getmode" ), LFUNCVAL( wifi_getmode ) },
|
||||||
|
{ LSTRKEY( "getchannel" ), LFUNCVAL( wifi_getchannel ) },
|
||||||
{ LSTRKEY( "setphymode" ), LFUNCVAL( wifi_setphymode ) },
|
{ LSTRKEY( "setphymode" ), LFUNCVAL( wifi_setphymode ) },
|
||||||
{ LSTRKEY( "getphymode" ), LFUNCVAL( wifi_getphymode ) },
|
{ LSTRKEY( "getphymode" ), LFUNCVAL( wifi_getphymode ) },
|
||||||
{ LSTRKEY( "startsmart" ), LFUNCVAL( wifi_start_smart ) },
|
{ LSTRKEY( "startsmart" ), LFUNCVAL( wifi_start_smart ) },
|
||||||
|
|
Loading…
Reference in New Issue