]> granicus.if.org Git - esp-idf/commitdiff
Use CONFIG value instead of hard-coded value.
authorZac Bond <zachary.bond@bigassfans.com>
Wed, 28 Aug 2019 21:30:07 +0000 (17:30 -0400)
committerbaohongde <baohongde@espressif.com>
Tue, 3 Sep 2019 02:21:45 +0000 (10:21 +0800)
Add intermediate defines.

Use CONFIG_BTU_TASK_STACK_SIZE instead of hard-coded value in Bluedroid component

components/bt/host/bluedroid/common/include/common/bluedroid_user_config.h
components/bt/host/bluedroid/common/include/common/bt_target.h
components/bt/host/bluedroid/stack/btu/btu_init.c

index e14773310a874c4c87de276d24eafa44e98f6a20..82082e1ea1ae17bb47faf3d12bc7ac230b69550e 100644 (file)
 #include "bt_common.h"
 #include "bt_user_config.h"
 
+/**********************************************************
+ * Thread/Task reference
+ **********************************************************/
+#ifdef CONFIG_BT_BTU_TASK_STACK_SIZE
+#define UC_BT_BTU_TASK_STACK_SIZE           CONFIG_BT_BTU_TASK_STACK_SIZE
+#else
+#define UC_BT_BTU_TASK_STACK_SIZE           4096
+#endif
+
+
 /**********************************************************
  * Profile reference
  **********************************************************/
index a59d3793e0d24611a1fd649b0acec094792e7799..bf5600580a3bbe0d6d6174e60961c4e3a8a8f604 100644 (file)
 
 #include "stack/dyn_mem.h"    /* defines static and/or dynamic memory for components */
 
+
+/* OS Configuration from User config (eg: sdkconfig) */
+#define BT_BTU_TASK_STACK_SIZE      UC_BT_BTU_TASK_STACK_SIZE
+
 /******************************************************************************
 **
 ** Classic BT features
index 80678bef82af8c8e40e8096c24b5ad52711fc067..430cd65af6f08ef62f69cf9f3cec31fdb8442198 100644 (file)
@@ -45,7 +45,7 @@
 #endif
 
 #define BTU_TASK_PINNED_TO_CORE         (TASK_PINNED_TO_CORE)
-#define BTU_TASK_STACK_SIZE             (4096 + BT_TASK_EXTRA_STACK_SIZE)
+#define BTU_TASK_STACK_SIZE             (BT_BTU_TASK_STACK_SIZE + BT_TASK_EXTRA_STACK_SIZE)
 #define BTU_TASK_PRIO                   (BT_TASK_MAX_PRIORITIES - 5)
 #define BTU_TASK_NAME                   "btuT"