⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 reset.c

📁 蓝牙HANDFREE软件源代码
💻 C
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -