?? open.c
字號:
#include "handsfree_private.h"
#include "handsfree.h"
#include <message.h>
/*
startReqAction
This function is called at the beginning of the application and
sets the ring duration, which defines the duration of a single
ring.
*/
void startReqAction(uint16 features, uint16 profiles)
{
/* Initialise the libs used by this app */
MAKE_MSG(HS_OPEN_REQ);
msg->hfSupportedFeatures = features;
msg->supportedProfiles = profiles;
putMsg(msg);
}
/*
hfOpenCfm
Called to indicate that the headset framework has completed
initialisation. If we are not already paired, go straight into a
pairing attempt. Otherwise, just go idle.
*/
void hfOpenCfm(const HS_OPEN_CFM_T *cfm)
{
/* reset state kept about the SLC */
hfResetConnectionState();
/* Init the current state */
setLocalState(idle);
/*
If we're paired so go into connectable mode, otherwise let the
interface app decide what to do
*/
if (cfm->isPaired)
{
connectReqAction();
}
else
{
/* If not paired perform a hard reset in case the default PIN has not been set */
resetReqAction();
}
/* Respond to a start_req */
handleOpenCfm(cfm->isPaired);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -