HAVE_HCI_DUMP -> ENABLE_LOG_INTO_HCI_DUMP

This commit is contained in:
Matthias Ringwald 2016-01-21 21:27:06 +01:00
parent d6549a6e45
commit 2539bee62f
16 changed files with 64 additions and 49 deletions

View File

@ -1,14 +1,19 @@
//
// btstack_config.h for Arduino port
//
#ifndef __BTSTACK_CONFIG
#define __BTSTACK_CONFIG
#define EMBEDDED
// Port related features
#define HAVE_BZERO
#define HAVE_TIME_MS
#define ENABLE_BLE
#define HAVE_HCI_DUMP
#define ENABLE_LOG_INTO_HCI_DUMP
#define ENABLE_LOG_INFO
#define ENABLE_LOG_ERROR

View File

@ -78,7 +78,7 @@ libBTstack.$(BTSTACK_LIB_EXTENSION): $(libBTstack_SOURCES)
# ranlib $@
BTdaemon: $(BTdaemon_SOURCES)
$(CC) $(CFLAGS) -DHAVE_HCI_DUMP -o $@ $^ $(LDFLAGS) $(LIBUSB_CFLAGS) $(LIBUSB_LDFLAGS)
$(CC) $(CFLAGS) -DENABLE_LOG_INTO_HCI_DUMP -o $@ $^ $(LDFLAGS) $(LIBUSB_CFLAGS) $(LIBUSB_LDFLAGS)
clean:
rm -rf libBTstack* BTdaemon *.o

View File

@ -12,7 +12,7 @@
#define HAVE_EHCILL
#define HAVE_HCI_DUMP
#define ENABLE_LOG_INTO_HCI_DUMP
// #define ENABLE_LOG_ERROR
// #define ENABLE_LOG_INFO
@ -41,3 +41,31 @@
#endif
//
// btstack_config.h for Arduino port
//
#ifndef __BTSTACK_CONFIG
#define __BTSTACK_CONFIG
// Port related features
#define HAVE_INIT_SCRIPT
#define HAVE_BZERO
#define HAVE_TIME
#define HAVE_MALLOC
// BTstack features that can be enabled
#define ENABLE_BLE
#define ENABLE_LOG_DEBUG
#define ENABLE_LOG_ERROR
#define ENABLE_LOG_INFO
#define ENABLE_LOG_INTO_HCI_DUMP
#define ENABLE_SDP_DES_DUMP
#define ENABLE_SDP_EXTRA_QUERIES
// BTstack configuration. buffers, sizes, ...
#define HCI_ACL_PAYLOAD_SIZE 52
#define HCI_INCOMING_PRE_BUFFER_SIZE 4
#endif

View File

@ -17,7 +17,7 @@
#define HAVE_TIME
#define HAVE_MALLOC
#define HAVE_BZERO
#define HAVE_HCI_DUMP
#define ENABLE_LOG_INTO_HCI_DUMP
#define ENABLE_LOG_INFO
#define ENABLE_LOG_ERROR
#define HCI_ACL_PAYLOAD_SIZE 1021

View File

@ -7,7 +7,7 @@
#define ENABLE_LOG_INFO
#define ENABLE_BLE
#define HAVE_BZERO
#define HAVE_HCI_DUMP
#define ENABLE_LOG_INTO_HCI_DUMP
#define HAVE_MALLOC
#define ENABLE_RFCOMM
#define ENABLE_SDP

View File

@ -12,7 +12,7 @@
#define HAVE_EHCILL
#define HAVE_HCI_DUMP
#define ENABLE_LOG_INTO_HCI_DUMP
// #define ENABLE_LOG_ERROR
// #define ENABLE_LOG_INFO

View File

@ -12,7 +12,7 @@
#define HAVE_EHCILL
#define HAVE_HCI_DUMP
#define ENABLE_LOG_INTO_HCI_DUMP
// #define ENABLE_LOG_ERROR
// #define ENABLE_LOG_INFO

View File

@ -14,7 +14,7 @@
#define HAVE_TIME
#define HAVE_MALLOC
#define HAVE_BZERO
#define HAVE_HCI_DUMP
#define ENABLE_LOG_INTO_HCI_DUMP
#define ENABLE_LOG_INFO
#define ENABLE_LOG_ERROR
#define HCI_ACL_PAYLOAD_SIZE 1021

View File

@ -17,7 +17,7 @@
#define ENABLE_LOG_ERROR
#define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy
#define HCI_ACL_PAYLOAD_SIZE (1691 + 4)
#define HAVE_HCI_DUMP
#define ENABLE_LOG_INTO_HCI_DUMP
#define ENABLE_SDP_DES_DUMP
#endif

View File

@ -7,7 +7,7 @@
#define ENABLE_LOG_INFO
#define ENABLE_BLE
#define HAVE_BZERO
#define HAVE_HCI_DUMP
#define ENABLE_LOG_INTO_HCI_DUMP
#define HAVE_MALLOC
#define ENABLE_RFCOMM
#define ENABLE_SDP

View File

@ -17,7 +17,7 @@
#define ENABLE_LOG_ERROR
#define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy
#define HCI_ACL_PAYLOAD_SIZE (1691 + 4)
#define HAVE_HCI_DUMP
#define ENABLE_LOG_INTO_HCI_DUMP
#define ENABLE_SDP_DES_DUMP
#endif

View File

@ -17,7 +17,7 @@
#define ENABLE_LOG_ERROR
#define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy
#define HCI_ACL_PAYLOAD_SIZE (1691 + 4)
#define HAVE_HCI_DUMP
#define ENABLE_LOG_INTO_HCI_DUMP
#define ENABLE_SDP_DES_DUMP
#endif

View File

@ -17,7 +17,7 @@
#define ENABLE_LOG_ERROR
#define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy
#define HCI_ACL_PAYLOAD_SIZE (1691 + 4)
#define HAVE_HCI_DUMP
#define ENABLE_LOG_INTO_HCI_DUMP
#define ENABLE_SDP_DES_DUMP
#endif

View File

@ -17,7 +17,7 @@
#define ENABLE_LOG_ERROR
#define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy
#define HCI_ACL_PAYLOAD_SIZE (1691 + 4)
#define HAVE_HCI_DUMP
#define ENABLE_LOG_INTO_HCI_DUMP
#define ENABLE_SDP_DES_DUMP
#define HAVE_SCO

View File

@ -70,7 +70,7 @@ static inline void __log_unused(const char *format, ...) {
#endif
#ifdef ENABLE_LOG_DEBUG
#ifdef HAVE_HCI_DUMP
#ifdef ENABLE_LOG_INTO_HCI_DUMP
#define log_debug(format, ...) HCI_DUMP_LOG(LOG_LEVEL_DEBUG, format, ## __VA_ARGS__)
#else
#define log_debug(format, ...) BTSTACK_PRINTF(format "\n", ## __VA_ARGS__)
@ -80,7 +80,7 @@ static inline void __log_unused(const char *format, ...) {
#endif
#ifdef ENABLE_LOG_INFO
#ifdef HAVE_HCI_DUMP
#ifdef ENABLE_LOG_INTO_HCI_DUMP
#define log_info(format, ...) HCI_DUMP_LOG(LOG_LEVEL_INFO, format, ## __VA_ARGS__)
#else
#define log_info(format, ...) BTSTACK_PRINTF(format "\n", ## __VA_ARGS__)
@ -90,7 +90,7 @@ static inline void __log_unused(const char *format, ...) {
#endif
#ifdef ENABLE_LOG_ERROR
#ifdef HAVE_HCI_DUMP
#ifdef ENABLE_LOG_INTO_HCI_DUMP
#define log_error(format, ...) HCI_DUMP_LOG(LOG_LEVEL_ERROR, format, ## __VA_ARGS__)
#else
#define log_error(format, ...) BTSTACK_PRINTF(format "\n", ## __VA_ARGS__)

View File

@ -1,45 +1,27 @@
// #define EMBEDDED
// #define HAVE_TICK
//
// btstack_config.h for Arduino port
//
#ifndef __BTSTACK_CONFIG
#define __BTSTACK_CONFIG
// Port related features
#define HAVE_INIT_SCRIPT
#define HAVE_BZERO
#define HAVE_TIME
#define ENABLE_SDP_DES_DUMP
#define HAVE_MALLOC
// BTstack features that can be enabled
#define ENABLE_BLE
#define ENABLE_LOG_DEBUG
#define ENABLE_LOG_INFO
#define ENABLE_LOG_ERROR
#define HAVE_HCI_DUMP
#define ENABLE_LOG_INFO
#define ENABLE_LOG_INTO_HCI_DUMP
#define ENABLE_SDP_DES_DUMP
#define ENABLE_SDP_EXTRA_QUERIES
// BTstack configuration. buffers, sizes, ...
#define HCI_ACL_PAYLOAD_SIZE 52
#define HCI_INCOMING_PRE_BUFFER_SIZE 4
#define MAX_SPP_CONNECTIONS 1
#define MAX_NO_HCI_CONNECTIONS MAX_SPP_CONNECTIONS
#define MAX_NO_L2CAP_SERVICES 2
#define MAX_NO_L2CAP_CHANNELS (1+MAX_SPP_CONNECTIONS)
#define MAX_NO_RFCOMM_MULTIPLEXERS MAX_SPP_CONNECTIONS
#define MAX_NO_RFCOMM_SERVICES 1
#define MAX_NO_RFCOMM_CHANNELS MAX_SPP_CONNECTIONS
#define MAX_NO_BNEP_SERVICES 1
#define MAX_NO_BNEP_CHANNELS MAX_SPP_CONNECTIONS
#define MAX_NO_DB_MEM_DEVICE_LINK_KEYS 2
#define MAX_NO_DB_MEM_DEVICE_NAMES 2
#define MAX_NO_DB_MEM_SERVICES 1
#define MAX_NO_WHITELIST_ENTRIES 1
#define HAVE_MALLOC
#if 0
// DeLock 4.0 Dongle (Broadcom BCM20702A0)
#define USB_VENDOR_ID 0x0a5c
#define USB_PRODUCT_ID 0x21e8
#else
// Generic CSR 4.0 Dongle
// #define USB_VENDOR_ID 0x0a12
// #define USB_PRODUCT_ID 0x0001
#endif