store num and size of SCO packets

This commit is contained in:
matthias.ringwald@gmail.com 2015-02-16 21:07:50 +00:00
parent a0aac9c4f8
commit a8b124471d
2 changed files with 5 additions and 3 deletions

View File

@ -967,9 +967,10 @@ static void event_handler(uint8_t *packet, int size){
// status
// "The HC_ACL_Data_Packet_Length return parameter will be used to determine the size of the L2CAP segments contained in ACL Data Packets"
hci_stack->acl_data_packet_length = READ_BT_16(packet, 6);
// ignore: SCO data packet len (8)
hci_stack->sco_data_packet_length = packet[8];
hci_stack->acl_packets_total_num = packet[9];
// ignore: total num SCO packets
hci_stack->sco_packets_total_num = packet[10];
if (hci_stack->state == HCI_STATE_INITIALIZING){
// determine usable ACL payload size
if (HCI_ACL_PAYLOAD_SIZE < hci_stack->acl_data_packet_length){

View File

@ -548,9 +548,10 @@ typedef struct {
/* host to controller flow control */
uint8_t num_cmd_packets;
// uint8_t total_num_cmd_packets;
uint8_t acl_packets_total_num;
uint16_t acl_data_packet_length;
uint8_t sco_packets_total_num;
uint8_t sco_data_packet_length;
uint8_t le_acl_packets_total_num;
uint16_t le_data_packets_length;