fixes for merge from develop

This commit is contained in:
Matthias Ringwald 2017-01-10 16:31:31 +01:00
parent fa5e295474
commit 634a9874c0
2 changed files with 8 additions and 6 deletions

View File

@ -15,7 +15,7 @@ COMMON += \
btstack_chipset_em9301.c \
btstack_chipset_stlc2500d.c \
btstack_chipset_tc3566x.c \
# btstack_chipset_bcm.c \
btstack_chipset_bcm.c \
# examples
include ${BTSTACK_ROOT}/example/Makefile.inc

View File

@ -26,6 +26,7 @@
#include "btstack_chipset_tc3566x.h"
int btstack_main(int argc, const char * argv[]);
static void local_version_information_handler(uint8_t * packet);
static hci_transport_config_uart_t config = {
HCI_TRANSPORT_CONFIG_UART,
@ -73,8 +74,12 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
if (is_bcm){
btstack_chipset_bcm_set_device_name((const char *)&packet[6]);
}
}
}
if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_version_information)){
local_version_information_handler(packet);
}
break;
default:
break;
}
@ -85,7 +90,7 @@ static void use_fast_uart(void){
config.baudrate_main = 921600;
}
static void local_version_information_callback(uint8_t * packet){
static void local_version_information_handler(uint8_t * packet){
printf("Local version information:\n");
uint16_t hci_version = little_endian_read_16(packet, 4);
uint16_t hci_revision = little_endian_read_16(packet, 6);
@ -166,9 +171,6 @@ int main(int argc, const char * argv[]){
hci_event_callback_registration.callback = &packet_handler;
hci_add_event_handler(&hci_event_callback_registration);
// setup dynamic chipset driver setup
hci_set_local_version_information_callback(&local_version_information_callback);
// handle CTRL-c
signal(SIGINT, sigint_handler);