@@ -131,8 +131,7 @@ BUILD_ASSERT(CONFIG_BT_BUF_EVT_RX_COUNT > CONFIG_BT_BUF_ACL_TX_COUNT,
131
131
132
132
/** Allocate a buffer for incoming data
133
133
*
134
- * This will set the buffer type so bt_buf_set_type() does not need to
135
- * be explicitly called.
134
+ * This will set the buffer type so it doesn't need to be explicitly encoded into the buffer.
136
135
*
137
136
* @param type Type of buffer. Only BT_BUF_EVT, BT_BUF_ACL_IN and BT_BUF_ISO_IN
138
137
* are allowed.
@@ -165,8 +164,7 @@ void bt_buf_rx_freed_cb_set(bt_buf_rx_freed_cb_t cb);
165
164
166
165
/** Allocate a buffer for outgoing data
167
166
*
168
- * This will set the buffer type so bt_buf_set_type() does not need to
169
- * be explicitly called.
167
+ * This will set the buffer type so it doesn't need to be explicitly encoded into the buffer.
170
168
*
171
169
* @param type Type of buffer. BT_BUF_CMD or BT_BUF_ACL_OUT.
172
170
* @param timeout Non-negative waiting period to obtain a buffer or one of the
@@ -180,8 +178,7 @@ struct net_buf *bt_buf_get_tx(enum bt_buf_type type, k_timeout_t timeout,
180
178
181
179
/** Allocate a buffer for an HCI Event
182
180
*
183
- * This will set the buffer type so bt_buf_set_type() does not need to
184
- * be explicitly called.
181
+ * This will set the buffer type so it doesn't need to be explicitly encoded into the buffer.
185
182
*
186
183
* @param evt HCI event code
187
184
* @param discardable Whether the driver considers the event discardable.
@@ -197,7 +194,7 @@ struct net_buf *bt_buf_get_evt(uint8_t evt, bool discardable, k_timeout_t timeou
197
194
* @param buf Bluetooth buffer
198
195
* @param type The BT_* type to set the buffer to
199
196
*/
200
- static inline void bt_buf_set_type (struct net_buf * buf , enum bt_buf_type type )
197
+ static inline void __deprecated bt_buf_set_type (struct net_buf * buf , enum bt_buf_type type )
201
198
{
202
199
__ASSERT_NO_MSG (net_buf_headroom (buf ) >= 1 );
203
200
net_buf_push_u8 (buf , type );
@@ -210,7 +207,7 @@ static inline void bt_buf_set_type(struct net_buf *buf, enum bt_buf_type type)
210
207
*
211
208
* @return The BT_* type to of the buffer
212
209
*/
213
- static inline enum bt_buf_type bt_buf_get_type (struct net_buf * buf )
210
+ static inline enum bt_buf_type __deprecated bt_buf_get_type (struct net_buf * buf )
214
211
{
215
212
return net_buf_pull_u8 (buf );
216
213
}
0 commit comments