Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
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
20#include <bluetooth/bluetooth.h>
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26/* AT Commands */
30};
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);
74 void (*service)(struct bt_conn *conn, uint32_t value);
82 void (*call)(struct bt_conn *conn, uint32_t value);
90 void (*call_setup)(struct bt_conn *conn, uint32_t value);
98 void (*call_held)(struct bt_conn *conn, uint32_t value);
106 void (*signal)(struct bt_conn *conn, uint32_t value);
114 void (*roam)(struct bt_conn *conn, uint32_t value);
122 void (*battery)(struct bt_conn *conn, uint32_t value);
130 void (*ring_indication)(struct bt_conn *conn);
138 void (*cmd_complete_cb)(struct bt_conn *conn,
140};
141
152
162int bt_hfp_hf_send_cmd(struct bt_conn *conn, enum bt_hfp_hf_at_cmd cmd);
163
164#ifdef __cplusplus
165}
166#endif
167
172#endif /* ZEPHYR_INCLUDE_BLUETOOTH_HFP_HF_H_ */
Bluetooth subsystem core APIs.
void
Definition: eswifi_shell.c:15
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:60
__UINT8_TYPE__ uint8_t
Definition: stdint.h:58
HFP profile application callback.
Definition: hfp_hf.h:49
void(* disconnected)(struct bt_conn *conn)
Definition: hfp_hf.h:66
void(* call_setup)(struct bt_conn *conn, uint32_t value)
Definition: hfp_hf.h:90
void(* call)(struct bt_conn *conn, uint32_t value)
Definition: hfp_hf.h:82
void(* signal)(struct bt_conn *conn, uint32_t value)
Definition: hfp_hf.h:106
void(* ring_indication)(struct bt_conn *conn)
Definition: hfp_hf.h:130
void(* battery)(struct bt_conn *conn, uint32_t value)
Definition: hfp_hf.h:122
void(* service)(struct bt_conn *conn, uint32_t value)
Definition: hfp_hf.h:74
void(* connected)(struct bt_conn *conn)
Definition: hfp_hf.h:57
void(* cmd_complete_cb)(struct bt_conn *conn, struct bt_hfp_hf_cmd_complete *cmd)
Definition: hfp_hf.h:138
void(* call_held)(struct bt_conn *conn, uint32_t value)
Definition: hfp_hf.h:98
void(* roam)(struct bt_conn *conn, uint32_t value)
Definition: hfp_hf.h:114
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