diff options
| author | hathach <[email protected]> | 2018-08-23 14:11:21 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-08-23 14:11:21 +0700 |
| commit | d18a9e8759fb168a55a2ded6f1f5b9d7db6ea078 (patch) | |
| tree | da682e33448848a793c83d2b542101cb723e13bf /lib | |
| parent | 5d365193158c9429ca279ab5f8fa4446bcc9663f (diff) | |
freertos blinky with software timer
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/FreeRTOS/FreeRTOSConfig.h | 14 | ||||
| -rw-r--r-- | lib/FreeRTOS/freertos_hook.c | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/lib/FreeRTOS/FreeRTOSConfig.h b/lib/FreeRTOS/FreeRTOSConfig.h index 6dbb674dc..ef936727e 100644 --- a/lib/FreeRTOS/FreeRTOSConfig.h +++ b/lib/FreeRTOS/FreeRTOSConfig.h @@ -4,13 +4,18 @@ //--------------------------------------------------------------------+ // See http://www.freertos.org/a00110.html. //--------------------------------------------------------------------+ +//#include "bsp/board.h" +#include "nrf.h" + +#if 0 #if CFG_TUSB_MCU == OPT_MCU_LPC43XX // TODO remove #include "lpc43xx_cgu.h" #define configCPU_CLOCK_HZ CGU_GetPCLKFrequency(CGU_PERIPHERAL_M4CORE) -#else - #define configCPU_CLOCK_HZ SystemCoreClock #endif +#endif + +#define configCPU_CLOCK_HZ SystemCoreClock #define configUSE_PREEMPTION 1 #define configUSE_PORT_OPTIMISED_TASK_SELECTION 0 @@ -31,9 +36,10 @@ #define configENABLE_BACKWARD_COMPATIBILITY 1 #define configSUPPORT_STATIC_ALLOCATION 1 +#define configSUPPORT_DYNAMIC_ALLOCATION 1 /* Hook function related definitions. */ -#define configUSE_IDLE_HOOK 1 +#define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configUSE_MALLOC_FAILED_HOOK 1 #define configCHECK_FOR_STACK_OVERFLOW 2 @@ -48,7 +54,7 @@ #define configMAX_CO_ROUTINE_PRIORITIES 2 /* Software timer related definitions. */ -#define configUSE_TIMERS 0 +#define configUSE_TIMERS 1 #define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 3 ) #define configTIMER_QUEUE_LENGTH 10 #define configTIMER_TASK_STACK_DEPTH configMINIMAL_STACK_SIZE diff --git a/lib/FreeRTOS/freertos_hook.c b/lib/FreeRTOS/freertos_hook.c index d96c0a669..70348a446 100644 --- a/lib/FreeRTOS/freertos_hook.c +++ b/lib/FreeRTOS/freertos_hook.c @@ -50,12 +50,6 @@ void vApplicationMallocFailedHook(void) TU_ASSERT(false, ); } -void vApplicationIdleHook(void) -{ - // no freeRTOS blocking API should be called here - __WFI(); // sleep until next interrupt -} - void vApplicationStackOverflowHook(xTaskHandle pxTask, signed char *pcTaskName) { (void) pxTask; |
