added l2cap_can_send_packet_now

This commit is contained in:
matthias.ringwald 2011-06-23 20:30:02 +00:00
parent a22f364722
commit 6b1fde377c
2 changed files with 8 additions and 0 deletions

View File

@ -196,6 +196,13 @@ l2cap_channel_t * l2cap_get_channel_for_local_cid(uint16_t local_cid){
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){
l2cap_channel_t * channel = l2cap_get_channel_for_local_cid(local_cid);
if (channel) {

View File

@ -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);
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_close_connection(void *connection);