Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
hci_pkt.h File Reference

Bluetooth HCI packet helpers. More...

#include <stdint.h>
#include <zephyr/bluetooth/hci_types.h>
#include <zephyr/net_buf.h>

Go to the source code of this file.

Data Structures

struct  bt_hci_pkt_cmd_rsp
 Decoded HCI command response. More...

Macros

#define BT_HCI_PKT_CMD_HDR_SIZE   (sizeof(uint8_t) + BT_HCI_CMD_HDR_SIZE)
 Size of the prefix of an HCI command packet.
#define BT_HCI_PKT_CMD_SIZE(param_len)
 Size of an HCI command packet with param_len bytes of parameters.
#define BT_HCI_PKT_CMD_DEFINE(_name, _max_param_len)
 Define a buffer for an HCI command packet.
#define BT_HCI_PKT_CMD_DEFINE_STATIC(_name, _max_param_len)
 Define a static buffer for an HCI command packet.

Functions

void bt_hci_pkt_reset_cmd (struct net_buf_simple *buf)
 Reset a buffer for a new HCI command packet.
int bt_hci_pkt_push_cmd_hdr (struct net_buf_simple *buf, uint16_t opcode)
 Push the packet indicator and command header of an HCI command packet.
int bt_hci_pkt_pull_cmd_complete (struct net_buf_simple *buf, struct bt_hci_pkt_cmd_rsp *rsp)
 Pull an HCI_Command_Complete event.
int bt_hci_pkt_pull_cmd_status (struct net_buf_simple *buf, struct bt_hci_pkt_cmd_rsp *rsp)
 Pull an HCI_Command_Status event.
int bt_hci_pkt_parse_cmd_rsp (const uint8_t *pkt, size_t len, struct bt_hci_pkt_cmd_rsp *rsp)
 Parse an HCI command response from a complete HCI packet.

Detailed Description

Bluetooth HCI packet helpers.