Skip to content

Commit

Permalink
update: 更新mobile.status函数的API注释,明确确保status值的含义
Browse files Browse the repository at this point in the history
  • Loading branch information
wendal committed May 7, 2024
1 parent f3df433 commit bc04d2f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion components/mobile/luat_lib_mobile.c
Expand Up @@ -570,7 +570,20 @@ static int l_mobile_sync_time(lua_State* L) {
/**
获取网络状态
@api mobile.status()
@return int 当前网络状态,0:网络未注册;1:网络已注册;2:正在搜网中;3:网络注册被拒绝
@return int 当前网络状态
@usage
-- 状态描述
-- 0:网络未注册
-- 1:网络已注册
-- 2:正在搜网中
-- 3:网络注册被拒绝
-- 4:网络状态未知
-- 5:漫游,且已注册
-- 6:仅SMS可用
-- 7:仅SMS可用,且漫游状态
-- 8:仅紧急呼叫. 注意, 国内不支持此状态,模块也不支持紧急呼叫
-- 不推荐使用本API判断联网状态, 建议使用socket.localIP()来判断
*/
static int l_mobile_status(lua_State* L) {
int LUAT_MOBILE_REGISTER_STATUS_E = luat_mobile_get_register_status();
Expand Down

0 comments on commit bc04d2f

Please sign in to comment.