Browse Source

fix: ble重连成功率低的问题, 原因是nimble中的某些函数依赖configTICK_RATE_HZ==500,具体是哪些还没排查到, 先做额外判断. 另外主库的rtos_freertos也做了兼容

https://gitee.com/openLuat/luatos-soc-air101/issues/I7C6TD
Wendal Chen 2 years ago
parent
commit
0555bb2d65
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/os/rtos/include/FreeRTOSConfig.h

+ 5 - 2
src/os/rtos/include/FreeRTOSConfig.h

@@ -54,7 +54,7 @@
 #ifndef FREERTOS_CONFIG_H
 #ifndef FREERTOS_CONFIG_H
 #define FREERTOS_CONFIG_H
 #define FREERTOS_CONFIG_H
 
 
-
+#include "luat_conf_bsp.h"
 
 
 /*-----------------------------------------------------------
 /*-----------------------------------------------------------
  * Application specific definitions.
  * Application specific definitions.
@@ -73,8 +73,11 @@
 #define configUSE_TICK_HOOK			1	
 #define configUSE_TICK_HOOK			1	
 
 
 #define configCPU_CLOCK_HZ			( ( unsigned long ) 40000000 )	/* =12.0MHz xtal multiplied by 5 using the PLL. *///???????????????
 #define configCPU_CLOCK_HZ			( ( unsigned long ) 40000000 )	/* =12.0MHz xtal multiplied by 5 using the PLL. *///???????????????
-
+#ifdef LUAT_USE_NIMBLE
+#define configTICK_RATE_HZ			( ( portTickType ) 500u )	
+#else
 #define configTICK_RATE_HZ			( ( portTickType ) 1000u )	
 #define configTICK_RATE_HZ			( ( portTickType ) 1000u )	
+#endif
 #define configMAX_PRIORITIES		(63)
 #define configMAX_PRIORITIES		(63)
 #define configMINIMAL_STACK_SIZE	( ( unsigned short ) 256 )	
 #define configMINIMAL_STACK_SIZE	( ( unsigned short ) 256 )	
 #define configTOTAL_HEAP_SIZE		( ( size_t ) 12 * 1024 )	
 #define configTOTAL_HEAP_SIZE		( ( size_t ) 12 * 1024 )