add l2cap_can_send_connectionless_packet_now

This commit is contained in:
matthias.ringwald@gmail.com 2014-04-03 18:59:44 +00:00
parent f65040e736
commit 3cab4fcaa6
3 changed files with 10 additions and 0 deletions

View File

@ -78,6 +78,10 @@ void l2cap_register_packet_handler(void (*handler)(void * connection, uint8_t pa
packet_handler = handler;
}
int l2cap_can_send_connectionless_packet_now(void){
return hci_can_send_packet_now_using_packet_buffer(HCI_ACL_DATA_PACKET);
}
uint8_t *l2cap_get_outgoing_buffer(void){
return hci_get_outgoing_acl_packet_buffer() + COMPLETE_L2CAP_HEADER; // 8 bytes
}

View File

@ -235,6 +235,10 @@ int l2cap_can_send_packet_now(uint16_t local_cid){
return hci_can_send_packet_now_using_packet_buffer(HCI_ACL_DATA_PACKET);
}
int l2cap_can_send_connectionless_packet_now(void){
return hci_can_send_packet_now_using_packet_buffer(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

@ -199,6 +199,8 @@ 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_connectionless_packet_now(void);
int l2cap_reserve_packet_buffer(void);
// get outgoing buffer and prepare data