From 132a216ba27c038d0705a1f04c4370ac9ea5d325 Mon Sep 17 00:00:00 2001 From: h2zero Date: Sun, 12 Jan 2025 11:00:48 -0700 Subject: [PATCH] Increase msys_1 blocks when privacy is enabled. --- cores/nRF5/nimble_config/ext_nimble_config.h | 4 ++- cores/nRF5/nimble_config/nrf51_nimconfig.h | 36 +++++++++++--------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/cores/nRF5/nimble_config/ext_nimble_config.h b/cores/nRF5/nimble_config/ext_nimble_config.h index 7b1cede..1ff03b8 100644 --- a/cores/nRF5/nimble_config/ext_nimble_config.h +++ b/cores/nRF5/nimble_config/ext_nimble_config.h @@ -67,4 +67,6 @@ #ifndef max #define max(a, b) ((a)>(b)?(a):(b)) -#endif \ No newline at end of file +#endif + +#define CONFIG_BT_NIMBLE_LEGACY_VHCI_ENABLE 1 diff --git a/cores/nRF5/nimble_config/nrf51_nimconfig.h b/cores/nRF5/nimble_config/nrf51_nimconfig.h index 14b5480..aa7c460 100644 --- a/cores/nRF5/nimble_config/nrf51_nimconfig.h +++ b/cores/nRF5/nimble_config/nrf51_nimconfig.h @@ -13,22 +13,6 @@ # define CONFIG_BT_NIMBLE_MAX_CONNECTIONS 1 #endif -#if (DEVICE_RAM_SIZE) > 16 -# ifndef CONFIG_BT_NIMBLE_MSYS1_BLOCK_COUNT -# define CONFIG_BT_NIMBLE_MSYS1_BLOCK_COUNT (12) -# endif -# ifndef CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE -# define CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE 2048 -# endif -#else -# ifndef CONFIG_BT_NIMBLE_MSYS1_BLOCK_COUNT -# define CONFIG_BT_NIMBLE_MSYS1_BLOCK_COUNT (5) -# endif -# ifndef CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE -# define CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE 1152 -# endif -#endif - #ifndef CONFIG_BT_NIMBLE_MAX_BONDS # define CONFIG_BT_NIMBLE_MAX_BONDS 1 #endif @@ -47,6 +31,26 @@ # endif #endif +#if (DEVICE_RAM_SIZE) > 16 +# ifndef CONFIG_BT_NIMBLE_MSYS1_BLOCK_COUNT +# define CONFIG_BT_NIMBLE_MSYS1_BLOCK_COUNT (12) +# endif +# ifndef CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE +# define CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE 2048 +# endif +#else +# ifndef CONFIG_BT_NIMBLE_MSYS1_BLOCK_COUNT +# if CONFIG_BT_NIMBLE_ENABLE_PRIVACY +# define CONFIG_BT_NIMBLE_MSYS1_BLOCK_COUNT (7) +# else +# define CONFIG_BT_NIMBLE_MSYS1_BLOCK_COUNT (5) +# endif +# endif +# ifndef CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE +# define CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE 1152 +# endif +#endif + #ifndef CONFIG_BT_NIMBLE_ATT_PREFERRED_MTU #define CONFIG_BT_NIMBLE_ATT_PREFERRED_MTU (23) #endif