added hci_can_send_packet_now

This commit is contained in:
matthias.ringwald 2011-06-21 18:19:07 +00:00
parent 2b83fb7d18
commit c24735b151
2 changed files with 14 additions and 0 deletions

View File

@ -208,6 +208,17 @@ uint16_t hci_max_acl_data_packet_length(){
return hci_stack.acl_data_packet_length;
}
int hci_can_send_packet_now(uint8_t packet_type){
switch (packet_type) {
case HCI_ACL_DATA_PACKET:
return hci_number_free_acl_slots();
case HCI_COMMAND_DATA_PACKET:
return 1;
default:
return 0;
}
}
int hci_send_acl_packet(uint8_t *packet, int size){
// check for free places on BT module

View File

@ -272,6 +272,9 @@ int hci_send_cmd_packet(uint8_t *packet, int size);
// send ACL packet
int hci_send_acl_packet(uint8_t *packet, int size);
// non-blocking UART driver needs
int hci_can_send_packet_now(uint8_t packet_type);
hci_connection_t * connection_for_handle(hci_con_handle_t con_handle);
uint8_t hci_number_outgoing_packets(hci_con_handle_t handle);
uint8_t hci_number_free_acl_slots(void);