Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
hci_lockstep.h
Go to the documentation of this file.
1
4
5/*
6 * Copyright (c) 2026 Silicon Laboratories Inc.
7 *
8 * SPDX-License-Identifier: Apache-2.0
9 */
10
11#ifndef ZEPHYR_INCLUDE_DRIVERS_BLUETOOTH_HCI_LOCKSTEP_H_
12#define ZEPHYR_INCLUDE_DRIVERS_BLUETOOTH_HCI_LOCKSTEP_H_
13
14#include <stdbool.h>
15#include <stddef.h>
16#include <stdint.h>
17
19#include <zephyr/device.h>
20#include <zephyr/kernel.h>
21#include <zephyr/net_buf.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
66
85typedef int (*bt_hci_lockstep_send_t)(const struct device *dev, const uint8_t *pkt, size_t len);
86
93 const struct device *dev;
95 struct k_sem changed;
96 struct k_spinlock lock;
97 struct net_buf_simple *rsp;
98 uint16_t opcode;
100 uint8_t status;
102
111};
112
127void bt_hci_lockstep_init(struct bt_hci_lockstep *ls, const struct device *dev,
129
156bool bt_hci_lockstep_feed(struct bt_hci_lockstep *ls, const uint8_t *pkt, size_t len);
157
211 struct net_buf_simple *cmd, struct net_buf_simple *rsp);
212
216
217#ifdef __cplusplus
218}
219#endif
220
221#endif /* ZEPHYR_INCLUDE_DRIVERS_BLUETOOTH_HCI_LOCKSTEP_H_ */
APIs and macros for the Zephyr device model.
void bt_hci_lockstep_init(struct bt_hci_lockstep *ls, const struct device *dev, bt_hci_lockstep_send_t send)
Initialize a lockstep helper.
int(* bt_hci_lockstep_send_t)(const struct device *dev, const uint8_t *pkt, size_t len)
Transport send function of a lockstep helper.
Definition hci_lockstep.h:85
int bt_hci_lockstep_cmd_send_sync(struct bt_hci_lockstep *ls, uint16_t opcode, struct net_buf_simple *cmd, struct net_buf_simple *rsp)
Send an HCI command and wait for its response.
bool bt_hci_lockstep_feed(struct bt_hci_lockstep *ls, const uint8_t *pkt, size_t len)
Feed a received HCI packet to a lockstep helper.
static void cmd(uint32_t command)
Execute a display list command by co-processor engine.
Definition ft8xx_reference_api.h:153
Bluetooth HCI packet helpers.
Public kernel APIs.
Buffer management.
state
Definition parser_state.h:29
ssize_t send(int sock, const void *buf, size_t len, int flags)
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Lockstep helper.
Definition hci_lockstep.h:91
k_timeout_t timeout
Command timeout.
Definition hci_lockstep.h:110
Runtime device structure (in ROM) per driver instance.
Definition device.h:543
Semaphore structure.
Definition kernel.h:3738
Kernel Spin Lock.
Definition spinlock.h:45
Kernel timeout type.
Definition clock.h:65
Simple network buffer representation.
Definition net_buf.h:89
uint16_t len
Length of the data behind the data pointer.
Definition net_buf.h:99