mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 13:20:39 +00:00
l2cap: annotate API - prepared buffer can only be used for L2CAP Basic Mode
This commit is contained in:
parent
8bea14f288
commit
4e6fa3a2bb
@ -794,10 +794,12 @@ uint8_t *l2cap_get_outgoing_buffer(void){
|
||||
return hci_get_outgoing_packet_buffer() + COMPLETE_L2CAP_HEADER; // 8 bytes
|
||||
}
|
||||
|
||||
// only for L2CAP Basic Channels
|
||||
int l2cap_reserve_packet_buffer(void){
|
||||
return hci_reserve_packet_buffer();
|
||||
}
|
||||
|
||||
// only for L2CAP Basic Channels
|
||||
void l2cap_release_packet_buffer(void){
|
||||
hci_release_packet_buffer();
|
||||
}
|
||||
@ -1097,6 +1099,7 @@ static int l2cap_send_signaling_packet(hci_con_handle_t handle, L2CAP_SIGNALING_
|
||||
}
|
||||
|
||||
// assumption - only on Classic connections
|
||||
// cannot be used for L2CAP ERTM
|
||||
int l2cap_send_prepared(uint16_t local_cid, uint16_t len){
|
||||
|
||||
if (!hci_is_packet_buffer_reserved()){
|
||||
|
@ -523,21 +523,25 @@ void l2cap_request_can_send_now_event(uint16_t local_cid);
|
||||
|
||||
/**
|
||||
* @brief Reserve outgoing buffer
|
||||
* @note Only for L2CAP Basic Mode Channels
|
||||
*/
|
||||
int l2cap_reserve_packet_buffer(void);
|
||||
|
||||
/**
|
||||
* @brief Get outgoing buffer and prepare data.
|
||||
* @note Only for L2CAP Basic Mode Channels
|
||||
*/
|
||||
uint8_t *l2cap_get_outgoing_buffer(void);
|
||||
|
||||
/**
|
||||
* @brief Send L2CAP packet prepared in outgoing buffer to channel
|
||||
* @note Only for L2CAP Basic Mode Channels
|
||||
*/
|
||||
int l2cap_send_prepared(uint16_t local_cid, uint16_t len);
|
||||
|
||||
/**
|
||||
* @brief Release outgoing buffer (only needed if l2cap_send_prepared is not called)
|
||||
* @note Only for L2CAP Basic Mode Channels
|
||||
*/
|
||||
void l2cap_release_packet_buffer(void);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user