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