123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172 |
- #ifndef ZEPHYR_INCLUDE_BLUETOOTH_HFP_HF_H_
- #define ZEPHYR_INCLUDE_BLUETOOTH_HFP_HF_H_
- #include <bluetooth/bluetooth.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- enum bt_hfp_hf_at_cmd {
- BT_HFP_HF_ATA,
- BT_HFP_HF_AT_CHUP,
- };
- #define HFP_HF_CMD_OK 0
- #define HFP_HF_CMD_ERROR 1
- #define HFP_HF_CMD_CME_ERROR 2
- #define HFP_HF_CMD_UNKNOWN_ERROR 4
- struct bt_hfp_hf_cmd_complete {
-
- uint8_t type;
-
- uint8_t cme;
- };
- struct bt_hfp_hf_cb {
-
- void (*connected)(struct bt_conn *conn);
-
- void (*disconnected)(struct bt_conn *conn);
-
- void (*service)(struct bt_conn *conn, uint32_t value);
-
- void (*call)(struct bt_conn *conn, uint32_t value);
-
- void (*call_setup)(struct bt_conn *conn, uint32_t value);
-
- void (*call_held)(struct bt_conn *conn, uint32_t value);
-
- void (*signal)(struct bt_conn *conn, uint32_t value);
-
- void (*roam)(struct bt_conn *conn, uint32_t value);
-
- void (*battery)(struct bt_conn *conn, uint32_t value);
-
- void (*ring_indication)(struct bt_conn *conn);
-
- void (*cmd_complete_cb)(struct bt_conn *conn,
- struct bt_hfp_hf_cmd_complete *cmd);
- };
- int bt_hfp_hf_register(struct bt_hfp_hf_cb *cb);
- int bt_hfp_hf_send_cmd(struct bt_conn *conn, enum bt_hfp_hf_at_cmd cmd);
- #ifdef __cplusplus
- }
- #endif
- #endif /* ZEPHYR_INCLUDE_BLUETOOTH_HFP_HF_H_ */
|