Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
hci.h
Go to the documentation of this file.
1/* hci.h - Bluetooth Host Control Interface definitions */
2
3/*
4 * Copyright (c) 2015-2016 Intel Corporation
5 *
6 * SPDX-License-Identifier: Apache-2.0
7 */
8#ifndef ZEPHYR_INCLUDE_BLUETOOTH_HCI_H_
9#define ZEPHYR_INCLUDE_BLUETOOTH_HCI_H_
10
11#include <stdbool.h>
12#include <stdint.h>
13
14#include <zephyr/net/buf.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
35struct net_buf *bt_hci_cmd_create(uint16_t opcode, uint8_t param_len);
36
54int bt_hci_cmd_send(uint16_t opcode, struct net_buf *buf);
55
79int bt_hci_cmd_send_sync(uint16_t opcode, struct net_buf *buf,
80 struct net_buf **rsp);
81
89int bt_hci_get_conn_handle(const struct bt_conn *conn, uint16_t *conn_handle);
90
98int bt_hci_get_adv_handle(const struct bt_le_ext_adv *adv, uint8_t *adv_handle);
99
111const char *bt_hci_get_ver_str(uint8_t core_version);
112
124typedef bool bt_hci_vnd_evt_cb_t(struct net_buf_simple *buf);
125
134
148int bt_hci_le_rand(void *buffer, size_t len);
149
150
151#ifdef __cplusplus
152}
153#endif
154
155#endif /* ZEPHYR_INCLUDE_BLUETOOTH_HCI_H_ */
Bluetooth device address definitions and utilities.
Bluetooth connection handling.
int bt_hci_get_adv_handle(const struct bt_le_ext_adv *adv, uint8_t *adv_handle)
Get advertising handle for an advertising set.
int bt_hci_le_rand(void *buffer, size_t len)
Get Random bytes from the LE Controller.
struct net_buf * bt_hci_cmd_create(uint16_t opcode, uint8_t param_len)
Allocate a HCI command buffer.
int bt_hci_cmd_send_sync(uint16_t opcode, struct net_buf *buf, struct net_buf **rsp)
Send a HCI command synchronously.
const char * bt_hci_get_ver_str(uint8_t core_version)
Obtain the version string given a core version number.
int bt_hci_get_conn_handle(const struct bt_conn *conn, uint16_t *conn_handle)
Get connection handle for a connection.
int bt_hci_register_vnd_evt_cb(bt_hci_vnd_evt_cb_t cb)
Register user callback for HCI Vendor-Specific Events.
int bt_hci_cmd_send(uint16_t opcode, struct net_buf *buf)
Send a HCI command asynchronously.
bool bt_hci_vnd_evt_cb_t(struct net_buf_simple *buf)
Callback type for vendor handling of HCI Vendor-Specific Events.
Definition: hci.h:124
Buffer management.
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
__UINT16_TYPE__ uint16_t
Definition: stdint.h:89
Simple network buffer representation.
Definition: buf.h:87
Network buffer representation.
Definition: buf.h:1004
uint16_t len
Length of the data behind the data pointer.
Definition: buf.h:1033