使用的是CC2541,想在断开事件中添加有关io的操作,但是没有找到断开事件是在哪处理的
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
那您也可以在工程内搜索 disconnect
在peripheralBroadcaster.c的最底部代码内您可以看到下面的代码,您可以参考一下
if ( events & UPDATE_PARAMS_TIMEOUT_EVT )
{
// Clear an existing timeout
if ( osal_get_timeoutEx( gapRole_TaskID, UPDATE_PARAMS_TIMEOUT_EVT ) )
{
VOID osal_stop_timerEx( gapRole_TaskID, UPDATE_PARAMS_TIMEOUT_EVT );
}
// The Update Parameters Timeout occurred - Terminate connection
VOID GAP_TerminateLinkReq( gapRole_TaskID, gapRole_ConnectionHandle,
HCI_DISCONNECT_REMOTE_USER_TERM );
return ( events ^ UPDATE_PARAMS_TIMEOUT_EVT );
}