You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
我在使用 ec200t 时遇到一个问题,模块 at 命令初始化之后一直打印 the power is off.,间隔为 EC200X_LINK_DELAY_TIME。
staticintec200x_check_link_status(structat_device*device)
{
at_response_tresp=RT_NULL;
structat_device_ec200x*ec200x=RT_NULL;
intresult=-RT_ERROR;
ec200x= (structat_device_ec200x*)device->user_data;
if ( ! ec200x->power_status)//power off
{
LOG_D("the power is off.");
return(-RT_ERROR);
}
/* ... */
}
目前我是做了以下修改规避这个问题
--- a/class/ec200x/at_device_ec200x.c
+++ b/class/ec200x/at_device_ec200x.c
@@ -44,6 +44,7 @@ static int ec200x_power_on(struct at_device *device)
if (ec200x->power_pin == -1)//no power on pin
{
+ ec200x->power_status = RT_TRUE;
return(RT_EOK);
}
if (ec200x->power_status_pin != -1)//use power status pin
@@ -82,6 +83,7 @@ static int ec200x_power_off(struct at_device *device)
if (ec200x->power_pin == -1)//no power on pin
{
+ ec200x->power_status = RT_FALSE;
return(RT_EOK);
}
if (ec200x->power_status_pin != -1)//use power status pin
不知道这是 bug 还是我使用方式不对。
The text was updated successfully, but these errors were encountered:
您好,感谢 at_device。
我在使用 ec200t 时遇到一个问题,模块 at 命令初始化之后一直打印 the power is off.,间隔为
EC200X_LINK_DELAY_TIME
。目前我是做了以下修改规避这个问题
不知道这是 bug 还是我使用方式不对。
The text was updated successfully, but these errors were encountered: