mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-25 18:35:17 +00:00
rename l2cap_can_send_packet_now_using_buffer to l2cap_can_send_packet_now
This commit is contained in:
parent
64f0b431f7
commit
85889d6cd5
@ -229,13 +229,6 @@ l2cap_channel_t * l2cap_get_channel_for_local_cid(uint16_t local_cid){
|
||||
}
|
||||
|
||||
int l2cap_can_send_packet_now(uint16_t local_cid){
|
||||
l2cap_channel_t *channel = l2cap_get_channel_for_local_cid(local_cid);
|
||||
if (!channel) return 0;
|
||||
if (!channel->packets_granted) return 0;
|
||||
return hci_can_send_packet_now(HCI_ACL_DATA_PACKET);
|
||||
}
|
||||
|
||||
int l2cap_can_send_packet_now_using_buffer(uint16_t local_cid){
|
||||
l2cap_channel_t *channel = l2cap_get_channel_for_local_cid(local_cid);
|
||||
if (!channel) return 0;
|
||||
if (!channel->packets_granted) return 0;
|
||||
|
@ -199,8 +199,6 @@ void l2cap_block_new_credits(uint8_t blocked);
|
||||
|
||||
int l2cap_can_send_packet_now(uint16_t local_cid); // non-blocking UART write
|
||||
|
||||
int l2cap_can_send_packet_now_using_buffer(uint16_t local_cid);
|
||||
|
||||
int l2cap_reserve_packet_buffer(void);
|
||||
|
||||
// get outgoing buffer and prepare data
|
||||
|
@ -491,7 +491,7 @@ static rfcomm_service_t * rfcomm_service_for_channel(uint8_t server_channel){
|
||||
*/
|
||||
static int rfcomm_send_packet_for_multiplexer(rfcomm_multiplexer_t *multiplexer, uint8_t address, uint8_t control, uint8_t credits, uint8_t *data, uint16_t len){
|
||||
|
||||
if (!l2cap_can_send_packet_now_using_buffer(multiplexer->l2cap_cid)) return BTSTACK_ACL_BUFFERS_FULL;
|
||||
if (!l2cap_can_send_packet_now(multiplexer->l2cap_cid)) return BTSTACK_ACL_BUFFERS_FULL;
|
||||
|
||||
l2cap_reserve_packet_buffer();
|
||||
uint8_t * rfcomm_out_buffer = l2cap_get_outgoing_buffer();
|
||||
|
@ -109,7 +109,7 @@ void sdp_client_query(bd_addr_t remote, uint8_t * des_serviceSearchPattern, uint
|
||||
static void try_to_send(uint16_t channel){
|
||||
if (sdp_client_state != W2_SEND) return;
|
||||
|
||||
if (!l2cap_can_send_packet_now_using_buffer(channel)) return;
|
||||
if (!l2cap_can_send_packet_now(channel)) return;
|
||||
|
||||
l2cap_reserve_packet_buffer();
|
||||
uint8_t * data = l2cap_get_outgoing_buffer();
|
||||
|
Loading…
x
Reference in New Issue
Block a user