Zephyr API Documentation 4.0.0-rc2
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
hfp_hf.h
Go to the documentation of this file.
1
5/*
6 * Copyright (c) 2015-2016 Intel Corporation
7 *
8 * SPDX-License-Identifier: Apache-2.0
9 */
10#ifndef ZEPHYR_INCLUDE_BLUETOOTH_HFP_HF_H_
11#define ZEPHYR_INCLUDE_BLUETOOTH_HFP_HF_H_
12
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26/* AT Commands */
31
32/*
33 * Command complete types for the application
34 */
35#define HFP_HF_CMD_OK 0
36#define HFP_HF_CMD_ERROR 1
37#define HFP_HF_CMD_CME_ERROR 2
38#define HFP_HF_CMD_UNKNOWN_ERROR 4
39
42 /* Command complete status */
44 /* CME error number to be added */
46};
47
57 void (*connected)(struct bt_conn *conn);
66 void (*disconnected)(struct bt_conn *conn);
75 void (*sco_connected)(struct bt_conn *conn, struct bt_conn *sco_conn);
84 void (*sco_disconnected)(struct bt_conn *sco_conn, uint8_t reason);
92 void (*service)(struct bt_conn *conn, uint32_t value);
100 void (*call)(struct bt_conn *conn, uint32_t value);
108 void (*call_setup)(struct bt_conn *conn, uint32_t value);
116 void (*call_held)(struct bt_conn *conn, uint32_t value);
124 void (*signal)(struct bt_conn *conn, uint32_t value);
132 void (*roam)(struct bt_conn *conn, uint32_t value);
140 void (*battery)(struct bt_conn *conn, uint32_t value);
148 void (*ring_indication)(struct bt_conn *conn);
156 void (*cmd_complete_cb)(struct bt_conn *conn,
158};
159
170
180int bt_hfp_hf_send_cmd(struct bt_conn *conn, enum bt_hfp_hf_at_cmd cmd);
181
182#ifdef __cplusplus
183}
184#endif
185
190#endif /* ZEPHYR_INCLUDE_BLUETOOTH_HFP_HF_H_ */
Bluetooth subsystem core APIs.
int bt_hfp_hf_register(struct bt_hfp_hf_cb *cb)
Register HFP HF profile.
int bt_hfp_hf_send_cmd(struct bt_conn *conn, enum bt_hfp_hf_at_cmd cmd)
Handsfree client Send AT.
bt_hfp_hf_at_cmd
Definition hfp_hf.h:27
@ BT_HFP_HF_AT_CHUP
Definition hfp_hf.h:29
@ BT_HFP_HF_ATA
Definition hfp_hf.h:28
static void cmd(uint32_t command)
Execute a display list command by co-processor engine.
Definition ft8xx_reference_api.h:153
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
HFP profile application callback.
Definition hfp_hf.h:49
void(* disconnected)(struct bt_conn *conn)
HF disconnected callback to application.
Definition hfp_hf.h:66
void(* call_setup)(struct bt_conn *conn, uint32_t value)
HF indicator Callback.
Definition hfp_hf.h:108
void(* call)(struct bt_conn *conn, uint32_t value)
HF indicator Callback.
Definition hfp_hf.h:100
void(* sco_disconnected)(struct bt_conn *sco_conn, uint8_t reason)
HF SCO/eSCO disconnected Callback.
Definition hfp_hf.h:84
void(* signal)(struct bt_conn *conn, uint32_t value)
HF indicator Callback.
Definition hfp_hf.h:124
void(* ring_indication)(struct bt_conn *conn)
HF incoming call Ring indication callback to application.
Definition hfp_hf.h:148
void(* battery)(struct bt_conn *conn, uint32_t value)
HF indicator Callback.
Definition hfp_hf.h:140
void(* service)(struct bt_conn *conn, uint32_t value)
HF indicator Callback.
Definition hfp_hf.h:92
void(* connected)(struct bt_conn *conn)
HF connected callback to application.
Definition hfp_hf.h:57
void(* cmd_complete_cb)(struct bt_conn *conn, struct bt_hfp_hf_cmd_complete *cmd)
HF notify command completed callback to application.
Definition hfp_hf.h:156
void(* call_held)(struct bt_conn *conn, uint32_t value)
HF indicator Callback.
Definition hfp_hf.h:116
void(* sco_connected)(struct bt_conn *conn, struct bt_conn *sco_conn)
HF SCO/eSCO connected Callback.
Definition hfp_hf.h:75
void(* roam)(struct bt_conn *conn, uint32_t value)
HF indicator Callback.
Definition hfp_hf.h:132
HFP HF Command completion field.
Definition hfp_hf.h:41
uint8_t type
Definition hfp_hf.h:43
uint8_t cme
Definition hfp_hf.h:45