From: wangmengyang Date: Mon, 28 Nov 2016 10:06:24 +0000 (+0800) Subject: Merge branch 'feature/btdm_bluedroid' into feature/btdm_a2dp X-Git-Tag: v2.1-rc1~196^2~67 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50227f12fdba6951f090c3bb2b430320d8480189;p=esp-idf Merge branch 'feature/btdm_bluedroid' into feature/btdm_a2dp # Conflicts: # components/bt/bluedroid/bta/include/bta_api.h # components/bt/bluedroid/bta/include/bta_gattc_int.h # components/bt/bluedroid/hci/hci_hal_h4.c # components/bt/bluedroid/hci/hci_layer.c # components/bt/bluedroid/include/bt_target.h # components/bt/bluedroid/stack/btu/btu_init.c --- 50227f12fdba6951f090c3bb2b430320d8480189 diff --cc components/bt/bluedroid/bta/include/bta_api.h index 9b8a405995,338fb96891..182482ef0f --- a/components/bt/bluedroid/bta/include/bta_api.h +++ b/components/bt/bluedroid/bta/include/bta_api.h @@@ -28,7 -28,8 +28,8 @@@ #include "bt_target.h" #include "bt_types.h" #include "btm_api.h" -// #include "uipc_msg.h" +#include "uipc_msg.h" + #include "sdp_api.h" #if BLE_INCLUDED == TRUE #include "btm_ble_api.h" diff --cc components/bt/bluedroid/osi/include/thread.h index 60e41990d8,11bf0f5850..d4d41542b8 --- a/components/bt/bluedroid/osi/include/thread.h +++ b/components/bt/bluedroid/osi/include/thread.h @@@ -40,9 -40,29 +40,29 @@@ enum SIG_PRF_WORK = 0xfd, SIG_BTU_START_UP = 0xfe, SIG_BTU_WORK = 0xff, - SIG_BTIF_WORK = 0xff + // SIG_BTIF_WORK = 0xff }; + #define HCI_HOST_TASK_STACK_SIZE 1024 + #define HCI_HOST_TASK_PRIO (configMAX_PRIORITIES - 3) + #define HCI_HOST_TASK_NAME "hciHostT" + #define HCI_HOST_QUEUE_NUM 30 + + #define HCI_H4_TASK_STACK_SIZE 1024 + #define HCI_H4_TASK_PRIO (configMAX_PRIORITIES - 3) + #define HCI_H4_TASK_NAME "hciH4T" + #define HCI_H4_QUEUE_NUM 30 + + #define BTU_TASK_STACK_SIZE 4096 + #define BTU_TASK_PRIO (configMAX_PRIORITIES - 1) + #define BTU_TASK_NAME "btuT" + #define BTU_QUEUE_NUM 30 + + #define BTC_TASK_QUEUE_NUM 20 + #define BTC_TASK_STACK_SIZE CONFIG_BTC_TASK_STACK_SIZE //by menuconfig + #define BTC_TASK_NAME "btcT" + #define BTC_TASK_PRIO (configMAX_PRIORITIES - 5) + void btu_task_post(uint32_t sig); void hci_host_task_post(void); void hci_hal_h4_task_post(void); diff --cc components/bt/bluedroid/stack/btu/btu_init.c index 68c4e03b5c,b4309f42c4..150073c005 --- a/components/bt/bluedroid/stack/btu/btu_init.c +++ b/components/bt/bluedroid/stack/btu/btu_init.c @@@ -200,9 -200,8 +200,8 @@@ void BTU_StartUp(void goto error_exit; } -- xBtuQueue = xQueueCreate(60, sizeof(BtTaskEvt_t)); - xTaskCreate(btu_task_thread_handler, "BtuT", 2048 + 1024, NULL, configMAX_PRIORITIES - 1, &xBtuTaskHandle); - ++ xBtuQueue = xQueueCreate(BTU_QUEUE_NUM, sizeof(BtTaskEvt_t)); + xTaskCreate(btu_task_thread_handler, BTU_TASK_NAME, BTU_TASK_STACK_SIZE, NULL, BTU_TASK_PRIO, &xBtuTaskHandle); btu_task_post(SIG_BTU_START_UP); /* // Continue startup on bt workqueue thread. diff --cc components/bt/component.mk index 35c34e773b,0d4f7b280d..a591dee3ac --- a/components/bt/component.mk +++ b/components/bt/component.mk @@@ -83,7 -70,7 +83,7 @@@ COMPONENT_SRCDIRS := bluedroid/bta/d bluedroid \ . --include $(IDF_PATH)/make/component_common.mk ++#include $(IDF_PATH)/make/component_common.mk ALL_LIB_FILES := $(patsubst %,$(COMPONENT_PATH)/lib/lib%.a,$(LIBS)) $(COMPONENT_LIBRARY): $(ALL_LIB_FILES) diff --cc examples/09_a2dp/components/bluedroid_demos/component.mk index 3260abf0ef,0000000000..714c9cd13c mode 100755,000000..100755 --- a/examples/09_a2dp/components/bluedroid_demos/component.mk +++ b/examples/09_a2dp/components/bluedroid_demos/component.mk @@@ -1,30 -1,0 +1,30 @@@ +# +# Main Makefile. This is basically the same as a component makefile. +# +# This Makefile should, at the very least, just include $(SDK_PATH)/make/component_common.mk. By default, +# this will take the sources in the src/ directory, compile them and link them into +# lib(subdirectory_name).a in the build directory. This behaviour is entirely configurable, +# please read the ESP-IDF documents if you need to do this. +# + +COMPONENT_ADD_INCLUDEDIRS := \ + udrv/include \ + btif/include \ + audio_a2dp_hw/include \ + embdrv/sbc/encoder/include \ + embdrv/sbc/decoder/include \ + include \ + +COMPONENT_SRCDIRS := \ + app_core \ + app_project \ + udrv/ulinux \ + embdrv/sbc/encoder/srce \ + embdrv/sbc/decoder/srce \ + btif/co \ + btif + +CFLAGS += -Wno-error=unused-label -Wno-error=return-type -Wno-error=missing-braces -Wno-error=pointer-sign -Wno-error=parentheses -I./include + + - include $(IDF_PATH)/make/component_common.mk ++#include $(IDF_PATH)/make/component_common.mk