hci: combine hci_packet_buffer_prefix with hci_packet_buffer into hci_packet_buffer_data and use hci_packet_buffer as pointer to point at pos HCI_OUTGOING_PRE_BUFFER_SIZE

This commit is contained in:
Matthias Ringwald 2016-07-14 14:22:24 +02:00
parent 313e5f9c03
commit 26a9b6da53
2 changed files with 5 additions and 2 deletions

View File

@ -1976,6 +1976,9 @@ void hci_init(const hci_transport_t *transport, const void *config){
// reference to used config
hci_stack->config = config;
// setup pointer for outgoing packet buffer
hci_stack->hci_packet_buffer = &hci_stack->hci_packet_buffer_data[HCI_OUTGOING_PRE_BUFFER_SIZE];
// max acl payload size defined in config.h
hci_stack->acl_data_packet_length = HCI_ACL_PAYLOAD_SIZE;

View File

@ -581,8 +581,8 @@ typedef struct {
uint8_t ssp_auto_accept;
// single buffer for HCI packet assembly + additional prebuffer for H4 drivers
uint8_t hci_packet_buffer_prefix[HCI_OUTGOING_PRE_BUFFER_SIZE];
uint8_t hci_packet_buffer[HCI_PACKET_BUFFER_SIZE]; // opcode (16), len(8)
uint8_t * hci_packet_buffer;
uint8_t hci_packet_buffer_data[HCI_OUTGOING_PRE_BUFFER_SIZE + HCI_PACKET_BUFFER_SIZE];
uint8_t hci_packet_buffer_reserved;
uint16_t acl_fragmentation_pos;
uint16_t acl_fragmentation_total_size;