mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-18 19:21:54 +00:00
added hci_can_send_packet_now
This commit is contained in:
parent
2b83fb7d18
commit
c24735b151
11
src/hci.c
11
src/hci.c
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user