mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-01 01:13:23 +00:00
added l2cap_can_send_packet_now
This commit is contained in:
parent
a22f364722
commit
6b1fde377c
@ -196,6 +196,13 @@ l2cap_channel_t * l2cap_get_channel_for_local_cid(uint16_t local_cid){
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
uint16_t l2cap_get_remote_mtu_for_local_cid(uint16_t local_cid){
|
uint16_t l2cap_get_remote_mtu_for_local_cid(uint16_t local_cid){
|
||||||
l2cap_channel_t * channel = l2cap_get_channel_for_local_cid(local_cid);
|
l2cap_channel_t * channel = l2cap_get_channel_for_local_cid(local_cid);
|
||||||
if (channel) {
|
if (channel) {
|
||||||
|
@ -136,6 +136,7 @@ int l2cap_send_internal(uint16_t local_cid, uint8_t *data, uint16_t len);
|
|||||||
uint16_t l2cap_get_remote_mtu_for_local_cid(uint16_t local_cid);
|
uint16_t l2cap_get_remote_mtu_for_local_cid(uint16_t local_cid);
|
||||||
|
|
||||||
void l2cap_block_new_credits(uint8_t blocked);
|
void l2cap_block_new_credits(uint8_t blocked);
|
||||||
|
int l2cap_can_send_packet_now(uint16_t local_cid); // non-blocking UART write
|
||||||
|
|
||||||
void l2cap_finialize_channel_close(l2cap_channel_t *channel);
|
void l2cap_finialize_channel_close(l2cap_channel_t *channel);
|
||||||
void l2cap_close_connection(void *connection);
|
void l2cap_close_connection(void *connection);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user