diff --git a/src/l2cap.c b/src/l2cap.c index 8063b32b4..0e0ba9810 100644 --- a/src/l2cap.c +++ b/src/l2cap.c @@ -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()){ diff --git a/src/l2cap.h b/src/l2cap.h index ed4891aae..527f76506 100644 --- a/src/l2cap.h +++ b/src/l2cap.h @@ -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);