reset.c
来自「蓝牙HANDFREE软件源代码」· C语言 代码 · 共 67 行
C
67 行
#include "handsfree_private.h"
#include "handsfree.h"
#include <message.h>
#include <stdlib.h>
/*
resetReqAction
The user has pressed some combination of buttons which means that
they want to reset any knowledge of pairing so we ask the
framework to handle this for us.
*/
void resetReqAction(void)
{
MAKE_MSG(HS_RESET_REQ);
putMsg(msg);
}
/*
hfResetCfm
Reset has completed
*/
void hfResetCfm(const HS_RESET_CFM_T *req)
{
/* keep the compiler happy */
req = req;
}
/*
hfResetConnectionState
Reset all flags that may have been set duing a connection
*/
void hfResetConnectionState(void)
{
/* If we had stored a number free it. No connection */
if (HFstate.numberLength)
{
free(HFstate.numberToDial);
HFstate.numberLength = 0;
HFstate.numberToDial = 0;
}
/* Reset the pending flags */
HFstate.dialNumberPending = 0;
HFstate.dialMemoryPending = 0;
HFstate.dialLastNumberPending = 0;
HFstate.audioTransferPending = 0;
HFstate.voiceDialPending = 0;
HFstate.ringing = 0;
HFstate.inBandRingEnabled = 0;
HFstate.microphoneMute = 0;
HFstate.hfCallActive = 0;
HFstate.hfCallSetup = 0;
/* reset the pair data */
HFstate.pair_data = 0;
/* Reset the ring handle to indicate there's no ring tone currently playing */
HFstate.AudioRingHandle = 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?