From 0804a8de6e0e165f26f53deb4ff535f1f9a29b35 Mon Sep 17 00:00:00 2001 From: Matt Kelly Date: Mon, 20 Feb 2017 15:47:00 -0500 Subject: [PATCH] esp32: Add libcoexist --- port/esp32/main/component.mk | 2 +- port/esp32/main/hal_uart_dma.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/port/esp32/main/component.mk b/port/esp32/main/component.mk index 56e3f508d..c115c5f36 100644 --- a/port/esp32/main/component.mk +++ b/port/esp32/main/component.mk @@ -11,7 +11,7 @@ BTSTACK_ROOT := ../../.. # Examples #include ${BTSTACK_ROOT}/example/Makefile.inc -COMPONENT_ADD_LDFLAGS := -l$(COMPONENT_NAME) $(COMPONENT_PATH)/../components/libbtdm_app/libbtdm_app.a +COMPONENT_ADD_LDFLAGS := -l$(COMPONENT_NAME) $(COMPONENT_PATH)/../components/libbtdm_app/libbtdm_app.a $(COMPONENT_PATH)/../components/libcoexist/libcoexist.a COMPONENT_ADD_INCLUDEDIRS := $(BTSTACK_ROOT)/src/ble $(BTSTACK_ROOT)/src $(BTSTACK_ROOT)/platform/embedded . diff --git a/port/esp32/main/hal_uart_dma.c b/port/esp32/main/hal_uart_dma.c index 7adc540ec..283392522 100644 --- a/port/esp32/main/hal_uart_dma.c +++ b/port/esp32/main/hal_uart_dma.c @@ -3,6 +3,8 @@ #include #include +#include "esp_err.h" +#include "esp_coexist.h" #include "freertos/FreeRTOS.h" /* VHCI function interface */ @@ -14,9 +16,11 @@ typedef struct vhci_host_callback { extern bool API_vhci_host_check_send_available(void); extern void API_vhci_host_send_packet(uint8_t *data, uint16_t len); extern void API_vhci_host_register_callback(const vhci_host_callback_t *callback); +extern void btdm_controller_init(void); void hal_uart_dma_init(void){ printf("hal_uart_dma_init\n"); + btdm_controller_init(); } void hal_uart_dma_set_block_received( void (*block_handler)(void)){