provide l2cap_can_send_fixed_channel_packet_now that takes handle as input

This commit is contained in:
matthias.ringwald@gmail.com 2014-08-11 21:49:15 +00:00
parent a35252c8fd
commit 6cd4da6bc4
3 changed files with 16 additions and 3 deletions

View File

@ -81,9 +81,14 @@ void l2cap_register_packet_handler(void (*handler)(void * connection, uint8_t pa
packet_handler = handler;
}
// @deprecated
int l2cap_can_send_connectionless_packet_now(void){
// TODO provide connection handle
return hci_can_send_acl_packet_now(0x1234);
// TODO provide real handle
return l2cap_can_send_fixed_channel_packet_now(0x1234);
}
int l2cap_can_send_fixed_channel_packet_now(uint16_t handle){
return hci_can_send_acl_packet_now(handle);
}
uint8_t *l2cap_get_outgoing_buffer(void){

View File

@ -247,9 +247,14 @@ int l2cap_can_send_packet_now(uint16_t local_cid){
return hci_can_send_acl_packet_now(channel->handle);
}
// @deprecated
int l2cap_can_send_connectionless_packet_now(void){
// TODO provide real handle
return hci_can_send_acl_packet_now(0x1234);
return l2cap_can_send_fixed_channel_packet_now(0x1234);
}
int l2cap_can_send_fixed_channel_packet_now(uint16_t handle){
return hci_can_send_acl_packet_now(handle);
}
uint16_t l2cap_get_remote_mtu_for_local_cid(uint16_t local_cid){

View File

@ -199,6 +199,9 @@ 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_fixed_channel_packet_now(uint16_t handle);
// @deprecated use l2cap_can_send_fixed_channel_packet_now instead
int l2cap_can_send_connectionless_packet_now(void);
int l2cap_reserve_packet_buffer(void);