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

📄 handsfree.h

📁 蓝牙HANDFREE软件源代码
💻 H
字号:
#ifndef _HF_H
#define _HF_H

#include "handsfree_types.h"
#include "handsfree_private.h"

#include <hshf_lib.h>


/* need a global variable to gain access to this information */
extern HandsFreeState HFstate ;



/* Functions provided by the Hands Free app and called from the interface */

/* call.c - HF initiates the creation of a SCO to the AG for call transfer */
void callTransferReqAction(uint16 pkt_type);

/* call.c - user has accepted a call */
void callAnswerAction(void);

/* call.c - user has rejected a call */
void callRejectAction(void);

/* call.c - enable or disable the AG sending caller id */
void hfCallerIdEnableAction(uint16 en);

/* cancel.c - cancel the current mode e.g. pair, connect */
void cancelCurrentStateAction(void);

/* connect.c - request to try to connect */
void connectReqAction(void);

/* connect.c - disconnect the specified connection to the device addess given */
void disconnectReqAction(hf_link_type_t link);

/* dial.c - handle a dial number request */
void dialNumberAction(uint8 *dial_number, uint16 num_length);

/* dial.c - handle a dial mem location request */
void dialMemoryAction(uint8 *mem, uint16 length);

/* dial.c - handle a last number redial from an external GUI */
void lastNumberRedialAction(void);

/* dtmf.c - handle a request to send a DTMF code */
void sendDtmfReqAction(char dtmf);

/* localState.c - check if the current state is connected */
uint16 isLocalStateConnected(void);

/* main.c - puts a message for the headset_framework in the sceduler queue */
void putMsg(void *msg);

/* microphone.c - toggle the mute status of the microphone */
void hfToggleMuteMicAction(void);

/* nrec.c - disable the noise reduction/ echo cancellation fun of the AG */
void disableNrecAction(void);

/* open.c - called when the handsfree powers up */
void startReqAction(uint16 features, uint16 profiles);

/* pair.c - request to go into pairing mode */
void pairReqAction(timeout_t timeout, framework_role_t pair_role);

/* reset.c - reset the pairing status of the application */
void resetReqAction(void);

/* voice.c - initiate voice dialling */
void startVoiceDialAction(uint16 en);

/* volume.c - handles a change volume request */
void volumeReqAction(int8 increment, uint8 gain);





/* Functions to be implemented by the interface to the Hands Free app */

/* Notification that initialisation is complete ... everything ready to go */
void handleOpenCfm(uint16 status);

/* Notification that pairing has completed */
void handlePairCfm(pairing_status_t status);

/* Notification that a ring is playing */
void handleRingInd(uint16 ring_state);

/* Notification that the local volume setting has changed */
void handleVolInd(uint8 gain);

/* Notification of an error or warning */
void handleErrorInd(error_code_t this_error);

/* Notification of a caller id having been received */
void handleCallerIdInd(uint16 length, const uint8 *caller_id);

/* Notification of a change in the state of one or both indicators */
void handleIndicatorUpdate(uint16 service_ind, uint16 call_ind, uint16 call_setup_ind);

/* Let the interface know that a connect cfm has been received */
void handleConnectComplete(void);

/* Called when the local state has been updated */
void handleLocalStateChange(void);

/* Voice dial indication informing of a change of state */
void handleVoiceDialStatusInd(uint16 status);



#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -