mirror of https://github.com/ARMmbed/mbed-os.git
fix wifi example fail issue
parent
d96de9c21a
commit
b1d999178a
|
|
@ -186,7 +186,6 @@ nsapi_error_t RTWInterface::scan(WiFiAccessPoint *res, unsigned count)
|
||||||
}
|
}
|
||||||
rtw_free_sema(&scan_sema);
|
rtw_free_sema(&scan_sema);
|
||||||
return ApNum;
|
return ApNum;
|
||||||
|
|
||||||
}else if(count > 0 && res != NULL){
|
}else if(count > 0 && res != NULL){
|
||||||
count = count < maxApNum ? count : maxApNum;
|
count = count < maxApNum ? count : maxApNum;
|
||||||
for(int i = 0; i < count; i++){
|
for(int i = 0; i < count; i++){
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -39,14 +39,22 @@ int osdep_print = 0;
|
||||||
void save_and_cli()
|
void save_and_cli()
|
||||||
{
|
{
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
#if defined(__CC_ARM)
|
||||||
|
rtw_enter_critical(NULL, NULL);
|
||||||
|
#else
|
||||||
__disable_irq();
|
__disable_irq();
|
||||||
|
#endif
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void restore_flags()
|
void restore_flags()
|
||||||
{
|
{
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
#if defined(__CC_ARM)
|
||||||
|
rtw_exit_critical(NULL, NULL);
|
||||||
|
#else
|
||||||
__enable_irq();
|
__enable_irq();
|
||||||
|
#endif
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -966,13 +974,15 @@ u32 _rtx_timerStop( _timerHandle xTimer,
|
||||||
{
|
{
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
rtx_tmr_t *tmr = (rtx_tmr_t *) xTimer;
|
rtx_tmr_t *tmr = (rtx_tmr_t *) xTimer;
|
||||||
|
if(_rtx_timerIsTimerActive(xTimer) == _TRUE){
|
||||||
osStatus status = osTimerStop(tmr->id);
|
osStatus status = osTimerStop(tmr->id);
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
if(status == osOK)
|
if(status != osOK){
|
||||||
return _SUCCESS;
|
|
||||||
|
|
||||||
DBG_ERR("error %d\n", status);
|
DBG_ERR("error %d\n", status);
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return _SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 _rtx_timerChangePeriod( _timerHandle xTimer,
|
u32 _rtx_timerChangePeriod( _timerHandle xTimer,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue