Skip to content

Commit 36c86cc

Browse files
jhedbergolivier-le-sage
authored andcommitted
[nrf fromtree] Bluetooth: Host: Mark bt_hci_cmd_create() as deprecated
Mark bt_hci_cmd_create() as deprecated (superceded by bt_hci_cmd_alloc()), and update any references to the new function. Signed-off-by: Johan Hedberg <[email protected]> (cherry picked from commit a22a4b1)
1 parent 0d9bd8c commit 36c86cc

File tree

1 file changed

+5
-3
lines changed
  • include/zephyr/bluetooth

1 file changed

+5
-3
lines changed

include/zephyr/bluetooth/hci.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,14 @@ static inline const char *bt_hci_err_to_str(uint8_t hci_err)
5656
* of the parameters. Upon successful return the buffer is ready to have
5757
* the parameters encoded into it.
5858
*
59+
* @deprecated Use bt_hci_cmd_alloc() instead.
60+
*
5961
* @param opcode Command OpCode.
6062
* @param param_len Length of command parameters.
6163
*
6264
* @return Newly allocated buffer.
6365
*/
64-
struct net_buf *bt_hci_cmd_create(uint16_t opcode, uint8_t param_len);
66+
__deprecated struct net_buf *bt_hci_cmd_create(uint16_t opcode, uint8_t param_len);
6567

6668
/** Allocate an HCI command buffer.
6769
*
@@ -80,7 +82,7 @@ struct net_buf *bt_hci_cmd_alloc(k_timeout_t timeout);
8082
/** Send a HCI command asynchronously.
8183
*
8284
* This function is used for sending a HCI command asynchronously. It can
83-
* either be called for a buffer created using bt_hci_cmd_create(), or
85+
* either be called for a buffer created using bt_hci_cmd_alloc(), or
8486
* if the command has no parameters a NULL can be passed instead. The
8587
* sending of the command will happen asynchronously, i.e. upon successful
8688
* return from this function the caller only knows that it was queued
@@ -99,7 +101,7 @@ int bt_hci_cmd_send(uint16_t opcode, struct net_buf *buf);
99101
/** Send a HCI command synchronously.
100102
*
101103
* This function is used for sending a HCI command synchronously. It can
102-
* either be called for a buffer created using bt_hci_cmd_create(), or
104+
* either be called for a buffer created using bt_hci_cmd_alloc(), or
103105
* if the command has no parameters a NULL can be passed instead.
104106
*
105107
* The function will block until a Command Status or a Command Complete

0 commit comments

Comments
 (0)