Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
 4.1.99
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
l2cap_br.h
Go to the documentation of this file.
1
5/*
6 * Copyright 2025 NXP
7 *
8 * SPDX-License-Identifier: Apache-2.0
9 */
10#ifndef ZEPHYR_INCLUDE_BLUETOOTH_L2CAP_BR_H_
11#define ZEPHYR_INCLUDE_BLUETOOTH_L2CAP_BR_H_
12
20#include <stddef.h>
21#include <stdint.h>
22
26#include <zephyr/kernel.h>
27#include <zephyr/net_buf.h>
28#include <zephyr/sys/atomic.h>
29#include <zephyr/sys/slist.h>
30#include <zephyr/sys/util.h>
31#include <sys/types.h>
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
58 void (*req)(struct bt_conn *conn, uint8_t identifier, struct net_buf *buf);
59
68 void (*rsp)(struct bt_conn *conn, struct net_buf *buf);
69
71 sys_snode_t _node;
72};
73
85
98
102#define BT_L2CAP_BR_ECHO_REQ_RESERVE BT_L2CAP_BUF_SIZE(4)
103
107#define BT_L2CAP_BR_ECHO_RSP_RESERVE BT_L2CAP_BUF_SIZE(4)
108
120int bt_l2cap_br_echo_req(struct bt_conn *conn, struct net_buf *buf);
121
134int bt_l2cap_br_echo_rsp(struct bt_conn *conn, uint8_t identifier, struct net_buf *buf);
135
136#ifdef __cplusplus
137}
138#endif
139
144#endif /* ZEPHYR_INCLUDE_BLUETOOTH_L2CAP_BR_H_ */
Bluetooth data buffer API.
Bluetooth connection handling.
int bt_l2cap_br_echo_cb_unregister(struct bt_l2cap_br_echo_cb *cb)
Unregister ECHO callbacks.
int bt_l2cap_br_echo_req(struct bt_conn *conn, struct net_buf *buf)
Send ECHO data through ECHO request.
int bt_l2cap_br_echo_cb_register(struct bt_l2cap_br_echo_cb *cb)
Register ECHO callbacks.
int bt_l2cap_br_echo_rsp(struct bt_conn *conn, uint8_t identifier, struct net_buf *buf)
Send ECHO data through ECHO response.
struct _snode sys_snode_t
Single-linked list node structure.
Definition slist.h:39
Public kernel APIs.
Buffer management.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
ECHO request/response callback structure.
Definition l2cap_br.h:47
void(* req)(struct bt_conn *conn, uint8_t identifier, struct net_buf *buf)
A ECHO request has been received.
Definition l2cap_br.h:58
void(* rsp)(struct bt_conn *conn, struct net_buf *buf)
A ECHO response has been received.
Definition l2cap_br.h:68
Network buffer representation.
Definition net_buf.h:1006
Misc utilities.