From f8da99a8ad1730675f2726b8c080178292aa3a24 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Wed, 3 Mar 2021 14:22:18 +0100 Subject: [PATCH] fix builds: libusb cmake, tool/metrics, test/mesh --- port/libusb/CMakeLists.txt | 3 +++ test/mesh/Makefile | 2 +- ...tstack_uart_block_posix_pty.c => btstack_uart_posix_pty.c} | 4 ++-- test/mesh/main.c | 4 ++-- tool/metrics/btstack_config.h | 1 + 5 files changed, 9 insertions(+), 5 deletions(-) rename test/mesh/{btstack_uart_block_posix_pty.c => btstack_uart_posix_pty.c} (99%) diff --git a/port/libusb/CMakeLists.txt b/port/libusb/CMakeLists.txt index e2cbe8000..a4f74bece 100644 --- a/port/libusb/CMakeLists.txt +++ b/port/libusb/CMakeLists.txt @@ -110,6 +110,9 @@ set (LWIP_PORT set (SOURCES_LWIP ${LWIP_CORE_SRC} ${LWIP_IPV4_SRC} ${LWIP_NETIF_SRC} ${LWIP_HTTPD} ${LWIP_DHCPD} ${LWIP_PORT}) +file(GLOB SOURCES_SRC_OFF "../../src/hci_transport_*.c") +list(REMOVE_ITEM SOURCES_SRC ${SOURCES_SRC_OFF}) + file(GLOB SOURCES_BLE_OFF "../../src/ble/le_device_db_memory.c") list(REMOVE_ITEM SOURCES_BLE ${SOURCES_BLE_OFF}) diff --git a/test/mesh/Makefile b/test/mesh/Makefile index 5f5e086ae..7dd0d4206 100644 --- a/test/mesh/Makefile +++ b/test/mesh/Makefile @@ -14,7 +14,7 @@ CORE += \ btstack_link_key_db_fs.c \ btstack_run_loop_posix.c \ btstack_stdin_posix.c \ - btstack_uart_block_posix_pty.c \ + btstack_uart_posix_pty.c \ hci_transport_h2_libusb.c \ hci_transport_h4.c \ btstack_tlv_posix.c \ diff --git a/test/mesh/btstack_uart_block_posix_pty.c b/test/mesh/btstack_uart_posix_pty.c similarity index 99% rename from test/mesh/btstack_uart_block_posix_pty.c rename to test/mesh/btstack_uart_posix_pty.c index 87197e260..a0de76430 100644 --- a/test/mesh/btstack_uart_block_posix_pty.c +++ b/test/mesh/btstack_uart_posix_pty.c @@ -35,7 +35,7 @@ * */ -#define __BTSTACK_FILE__ "btstack_uart_block_posix.c" +#define __BTSTACK_FILE__ "btstack_uart_posix.c" /* * btstack_uart_block_posix.c @@ -410,6 +410,6 @@ static const btstack_uart_block_t btstack_uart_posix = { /* void (*set_wakeup_handler)(void (*handler)(void)); */ NULL, }; -const btstack_uart_block_t * btstack_uart_block_posix_instance(void){ +const btstack_uart_block_t * btstack_uart_posix_instance(void){ return &btstack_uart_posix; } diff --git a/test/mesh/main.c b/test/mesh/main.c index 61fed0dc6..19565fc87 100644 --- a/test/mesh/main.c +++ b/test/mesh/main.c @@ -212,8 +212,8 @@ int main(int argc, const char * argv[]){ const hci_transport_t * transport; if (config.device_name){ // PTY - const btstack_uart_block_t * uart_driver = btstack_uart_block_posix_instance(); - transport = hci_transport_h4_instance(uart_driver); + const btstack_uart_t * uart_driver = btstack_uart_posix_instance(); + transport = hci_transport_h4_instance_for_uart(uart_driver); } else { // libusb if (usb_path_len){ diff --git a/tool/metrics/btstack_config.h b/tool/metrics/btstack_config.h index 34273eb14..26ae72fe6 100644 --- a/tool/metrics/btstack_config.h +++ b/tool/metrics/btstack_config.h @@ -28,6 +28,7 @@ // BTstack configuration. buffers, sizes, ... #define HCI_ACL_PAYLOAD_SIZE (1691 + 4) #define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof BNEP header, avoid memcpy +#define HCI_OUTGOING_PRE_BUFFER_SIZE 4 #define MAX_NR_LE_DEVICE_DB_ENTRIES 4