From 2ab223899f8af69d260cd0c669d4645777a8da18 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Tue, 14 Aug 2018 22:42:35 +0200 Subject: [PATCH] daemon: use btstack_uart_block_windows.c on mingw* --- port/daemon/configure.ac | 5 +++++ port/daemon/src/Makefile.in | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/port/daemon/configure.ac b/port/daemon/configure.ac index f8e35a6ae..3b8ffe701 100644 --- a/port/daemon/configure.ac +++ b/port/daemon/configure.ac @@ -42,6 +42,7 @@ case "$host_os" in BTSTACK_DEVICE_NAME_DB_INSTANCE="btstack_device_name_db_corefoundation_instance" UNIX_SOCKETS=yes HCI_USB_LIB=libusb + UART_BLOCK=posix ;; mingw*) echo "Building on mingw32" @@ -54,6 +55,7 @@ case "$host_os" in # BTSTACK_DEVICE_NAME_DB_INSTANCE="btstack_device_name_db_memory_instance" UNIX_SOCKETS=no HCI_USB_LIB=winusb + UART_BLOCK=windows ;; *) btstack_run_loop_SOURCES="btstack_run_loop_posix.c" @@ -64,6 +66,7 @@ case "$host_os" in # BTSTACK_DEVICE_NAME_DB_INSTANCE="btstack_device_name_db_fs_instance" UNIX_SOCKETS=yes HCI_USB_LIB=libusb + UART_BLOCK=posix ;; esac @@ -168,6 +171,7 @@ if test "x$HCI_TRANSPORT" = xUSB; then echo "#define USB_PRODUCT_ID $USB_PRODUCT_ID" >> btstack_config.h echo "#define USB_VENDOR_ID $USB_VENDOR_ID" >> btstack_config.h else + UART_SOURCES=btstack_uart_block_$UART_BLOCK.c echo "#define HAVE_TRANSPORT_H4" >> btstack_config.h echo "#define UART_DEVICE \"$UART_DEVICE\"" >> btstack_config.h echo "#define UART_SPEED $UART_SPEED" >> btstack_config.h @@ -185,6 +189,7 @@ echo "#endif" >> btstack_config.h AC_SUBST(HAVE_LIBUSB) AC_SUBST(REMOTE_DEVICE_DB_SOURCES) AC_SUBST(USB_SOURCES) +AC_SUBST(UART_SOURCES) AC_SUBST(btstack_run_loop_SOURCES) AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) diff --git a/port/daemon/src/Makefile.in b/port/daemon/src/Makefile.in index e5780c071..a36bf7f05 100644 --- a/port/daemon/src/Makefile.in +++ b/port/daemon/src/Makefile.in @@ -27,6 +27,7 @@ VPATH += ${BTSTACK_ROOT}/src/classic remote_device_db_sources = @REMOTE_DEVICE_DB_SOURCES@ btstack_run_loop_sources = @btstack_run_loop_SOURCES@ usb_sources = @USB_SOURCES@ +uart_sources = @UART_SOURCES@ libBTstack_SOURCES = \ btstack.c \ @@ -44,6 +45,7 @@ libBTstack_SOURCES = \ BTdaemon_SOURCES = \ $(libBTstack_SOURCES) \ $(usb_sources) \ + $(uart_sources) \ $(remote_device_db_sources) \ ad_parser.c \ att_db.c \ @@ -54,7 +56,6 @@ BTdaemon_SOURCES = \ btstack_memory.c \ btstack_memory_pool.c \ btstack_tlv.c \ - btstack_uart_block_posix.c \ daemon.c \ gatt_client.c \ hci.c \