Merge branch 'develop'

This commit is contained in:
Matthias Ringwald 2016-07-14 14:22:43 +02:00
commit 6d4512e2c5
2 changed files with 6 additions and 2 deletions

View File

@ -1727,6 +1727,7 @@ static void event_handler(uint8_t *packet, int size){
break;
case HCI_EVENT_HARDWARE_ERROR:
log_error("Hardware Error: 0x%02x", packet[2]);
if (hci_stack->hardware_error_callback){
(*hci_stack->hardware_error_callback)();
} else {
@ -1975,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;