File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
include/zephyr/bluetooth/classic
subsys/bluetooth/host/classic Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -264,6 +264,19 @@ int bt_avrcp_connect(struct bt_conn *conn);
264
264
*/
265
265
int bt_avrcp_disconnect (struct bt_conn * conn );
266
266
267
+ /**
268
+ * @brief Allocate a net_buf for AVRCP PDU transmission, reserving headroom
269
+ * for AVRCP, AVRCTP, L2CAP, and ACL headers.
270
+ *
271
+ * This function allocates a buffer from the specified pool and reserves
272
+ * sufficient headroom for protocol headers required by AVRCP over Bluetooth.
273
+ *
274
+ * @param pool The buffer pool to allocate from.
275
+ *
276
+ * @return A newly allocated net_buf with reserved headroom.
277
+ */
278
+ struct net_buf * bt_avrcp_create_pdu (struct net_buf_pool * pool );
279
+
267
280
/** @brief Register callback.
268
281
*
269
282
* Register AVRCP callbacks to monitor the state and interact with the remote device.
Original file line number Diff line number Diff line change @@ -814,6 +814,14 @@ int bt_avrcp_disconnect(struct bt_conn *conn)
814
814
return err ;
815
815
}
816
816
817
+ struct net_buf * bt_avrcp_create_pdu (struct net_buf_pool * pool )
818
+ {
819
+ return bt_conn_create_pdu (pool ,
820
+ sizeof (struct bt_l2cap_hdr ) +
821
+ sizeof (struct bt_avctp_header ) +
822
+ sizeof (struct bt_avrcp_header ));
823
+ }
824
+
817
825
int bt_avrcp_ct_get_cap (struct bt_avrcp_ct * ct , uint8_t tid , uint8_t cap_id )
818
826
{
819
827
struct net_buf * buf ;
You can’t perform that action at this time.
0 commit comments