我做了一个蓝牙连接超时的程序,如果打一定时间还没主机连接蓝牙,蓝牙广播自动关闭
if( events & SBP_BLE_CONNECT_TIMEOUT_EVT )
{
uint8 new_adv_enabled_status;
new_adv_enabled_status = FALSE;
GAPRole_SetParameter( GAPROLE_ADVERT_ENABLED, sizeof( uint8 ), & new_adv_enabled_status );
return ( events ^ SBP_BLE_CONNECT_TIMEOUT_EVT );
}
我能确定程序已经执行到里面去了,为什么广播关不掉?