bthf_interface_t 结构参考

bthf_interface_t 结构参考

#include < bt_hf.h >

数据字段

尺寸_t尺寸
bt_status_t (* init )( bthf_callbacks_t *callbacks, int max_hf_clients)
bt_status_t (*连接)(bt_bdaddr_t *bd_addr)
bt_status_t (*断开)(bt_bdaddr_t *bd_addr)
bt_status_t (*连接音频 )( bt_bdaddr_t *bd_addr)
bt_status_t (* disconnect_audio )(bt_bdaddr_t *bd_addr)
bt_status_t (* start_voice_recognition )(bt_bdaddr_t *bd_addr)
bt_status_t (* stop_voice_recognition )(bt_bdaddr_t *bd_addr)
bt_status_t (* volume_control )( bthf_volume_type_t type, int volume, bt_bdaddr_t *bd_addr)
bt_status_t (* device_status_notification )( bthf_network_state_t ntk_state, bthf_service_type_t svc_type, int signal, int batt_chg)
bt_status_t (* cops_response )(const char *cops, bt_bdaddr_t *bd_addr)
bt_status_t (* cind_response )(int svc,int num_active,int num_held, bthf_call_state_t call_setup_state,int 信号,int roam,int batt_chg,bt_bdaddr_t *bd_addr)
bt_status_t (* formatted_at_response )(const char *rsp, bt_bdaddr_t *bd_addr)
bt_status_t (* at_response )( bthf_at_response_t response_code, int error_code, bt_bdaddr_t *bd_addr)
bt_status_t (* clcc_response )(int index, bthf_call_direction_t dir, bthf_call_state_t state, bthf_call_mode_t mode, bthf_call_mpty_type_t mpty , const char *number, bthf_call_addrtype_t type, bt_bdaddr_t *bd_addr)
bt_status_t (* phone_state_change )(int num_active, int num_held, bthf_call_state_t call_setup_state, const char *number, bthf_call_addrtype_t类型)
空白(*清理)(无效)
bt_status_t (* configure_wbs )(bt_bdaddr_t *bd_addr, bthf_wbs_config_t配置)

详细说明

代表标准 BT-HF 接口。

在文件bt_hf.h的第223行定义。

现场文件

bt_status_t (* at_response)( bthf_at_response_t response_code, int error_code, bt_bdaddr_t *bd_addr)

正常/错误响应 ERROR (0) OK (1)

在文件bt_hf.h的第271行定义。

bt_status_t (* cind_response)(int svc, int num_active, int num_held, bthf_call_state_t call_setup_state, int signal, int roam, int batt_chg, bt_bdaddr_t *bd_addr)

CIND 命令的响应

在文件bt_hf.h的第261行定义。

bt_status_t (* clcc_response)(int index, bthf_call_direction_t dir, bthf_call_state_t state, bthf_call_mode_t mode, bthf_call_mpty_type_t mpty , const char *number, bthf_call_addrtype_t type, bt_bdaddr_t *bd_addr)

CLCC 命令的响应 可以为每个调用索引迭代调用 调用索引为 0 将被视为 NULL 终止(完成响应)

在文件bt_hf.h的第277行定义。

无效(*清理)(无效)

关闭界面。

在文件bt_hf.h的第293行定义。

bt_status_t (* configure_wbs)(bt_bdaddr_t *bd_addr, bthf_wbs_config_t配置)

SCO编解码器的配置

在文件bt_hf.h的第296行定义。

bt_status_t (* 连接)(bt_bdaddr_t *bd_addr)

连接到耳机

在文件bt_hf.h的第233行定义。

bt_status_t (* connect_audio)(bt_bdaddr_t *bd_addr)

创建音频连接

在文件bt_hf.h的第239行定义。

bt_status_t (* cops_response)(const char *cops, bt_bdaddr_t *bd_addr)

COPS 命令的响应

在文件bt_hf.h的第258行定义。

bt_status_t (* device_status_notification)( bthf_network_state_t ntk_state, bthf_service_type_t svc_type, int signal, int batt_chg)

组合设备状态变化通知

在文件bt_hf.h的第254行定义。

bt_status_t (* 断开连接)(bt_bdaddr_t *bd_addr)

从耳机断开连接

在文件bt_hf.h的第236行定义。

bt_status_t (* disconnect_audio)(bt_bdaddr_t *bd_addr)

关闭音频连接

在文件bt_hf.h的第242行定义。

bt_status_t (* formatted_at_response)(const char *rsp, bt_bdaddr_t *bd_addr)

预先格式化的 AT 响应,通常用于响应未知的 AT cmd

在文件bt_hf.h的第265行定义。

bt_status_t (* init)( bthf_callbacks_t *callbacks, int max_hf_clients)

注册 BtHf 回调

在文件bt_hf.h的第230行定义。

bt_status_t (* phone_state_change)(int num_active, int num_held, bthf_call_state_t call_setup_state, const char *number, bthf_call_addrtype_t类型)

通知呼叫状态变化每次更新通知

  1. 活动/保持/振铃呼叫数
  2. call_state:这表示触发此消息的状态更改这将采用 BtHfCallState 中的值之一
  3. 号码和类型:仅对来电和等待电话有效

在文件bt_hf.h的第289行定义。

size_t 大小

设置为 sizeof(BtHfInterface)

在文件bt_hf.h的第226行定义。

bt_status_t (* start_voice_recognition)(bt_bdaddr_t *bd_addr)

开始语音识别

在文件bt_hf.h的第245行定义。

bt_status_t (* stop_voice_recognition)(bt_bdaddr_t *bd_addr)

停止语音识别

在文件bt_hf.h的第248行定义。

bt_status_t (* volume_control)( bthf_volume_type_t type, int volume, bt_bdaddr_t *bd_addr)

音量控制

在文件bt_hf.h的第251行定义。


此结构的文档是从以下文件生成的: