Zephyr API
4.5.99
A Scalable Open Source RTOS
Toggle main menu visibility
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
18
#include <
zephyr/bluetooth/hci_pkt.h
>
19
#include <
zephyr/device.h
>
20
#include <
zephyr/kernel.h
>
21
#include <
zephyr/net_buf.h
>
22
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
72
91
typedef
int (*
bt_hci_lockstep_send_t
)(
const
struct
device
*dev,
const
uint8_t
*pkt,
size_t
len);
92
97
struct
bt_hci_lockstep
{
99
const
struct
device
*dev;
100
bt_hci_lockstep_send_t
send
;
101
struct
k_sem
changed;
102
struct
k_spinlock
lock;
103
struct
net_buf_simple
*rsp;
104
uint16_t
opcode;
105
uint8_t
state
;
106
uint8_t
status;
108
116
k_timeout_t
timeout
;
117
};
118
131
void
bt_hci_lockstep_init
(
struct
bt_hci_lockstep
*ls,
const
struct
device
*dev,
132
bt_hci_lockstep_send_t
send
);
133
166
void
bt_hci_lockstep_reset
(
struct
bt_hci_lockstep
*ls);
167
194
bool
bt_hci_lockstep_feed
(
struct
bt_hci_lockstep
*ls,
const
uint8_t
*pkt,
size_t
len
);
195
248
int
bt_hci_lockstep_cmd_send_sync
(
struct
bt_hci_lockstep
*ls,
uint16_t
opcode,
249
struct
net_buf_simple
*
cmd
,
struct
net_buf_simple
*rsp);
250
254
255
#ifdef __cplusplus
256
}
257
#endif
258
259
#endif
/* ZEPHYR_INCLUDE_DRIVERS_BLUETOOTH_HCI_LOCKSTEP_H_ */
device.h
APIs and macros for the Zephyr device model.
bt_hci_lockstep_init
void bt_hci_lockstep_init(struct bt_hci_lockstep *ls, const struct device *dev, bt_hci_lockstep_send_t send)
Initialize a lockstep helper.
bt_hci_lockstep_reset
void bt_hci_lockstep_reset(struct bt_hci_lockstep *ls)
Restore the initial state of a lockstep helper.
bt_hci_lockstep_send_t
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:91
bt_hci_lockstep_cmd_send_sync
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.
bt_hci_lockstep_feed
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.
cmd
static void cmd(uint32_t command)
Execute a display list command by co-processor engine.
Definition
ft8xx_reference_api.h:153
hci_pkt.h
Bluetooth HCI packet helpers.
kernel.h
Public kernel APIs.
net_buf.h
Buffer management.
state
state
Definition
parser_state.h:29
send
ssize_t send(int sock, const void *buf, size_t len, int flags)
stdbool.h
stdint.h
uint8_t
__UINT8_TYPE__ uint8_t
Definition
stdint.h:88
uint16_t
__UINT16_TYPE__ uint16_t
Definition
stdint.h:89
bt_hci_lockstep
Lockstep helper.
Definition
hci_lockstep.h:97
bt_hci_lockstep::timeout
k_timeout_t timeout
Command timeout.
Definition
hci_lockstep.h:116
device
Runtime device structure (in ROM) per driver instance.
Definition
device.h:543
k_sem
Semaphore structure.
Definition
kernel.h:3752
k_spinlock
Kernel Spin Lock.
Definition
spinlock.h:45
k_timeout_t
Kernel timeout type.
Definition
clock.h:65
net_buf_simple
Simple network buffer representation.
Definition
net_buf.h:97
net_buf_simple::len
uint16_t len
Length of the data behind the data pointer.
Definition
net_buf.h:107
zephyr
drivers
bluetooth
hci_lockstep.h
Generated on
for Zephyr API by
1.17.0