123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207 |
- #ifndef FREERTOS_CONFIG_H
- #define FREERTOS_CONFIG_H
- #ifdef SOFTDEVICE_PRESENT
- #include "nrf_soc.h"
- #endif
- #include "app_util_platform.h"
- #define FREERTOS_USE_RTC 0
- #define FREERTOS_USE_SYSTICK 1
- #define configTICK_SOURCE FREERTOS_USE_RTC
- #define configUSE_PREEMPTION 1
- #define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
- #define configUSE_TICKLESS_IDLE 0
- #define configUSE_TICKLESS_IDLE_SIMPLE_DEBUG 1
- #define configCPU_CLOCK_HZ ( SystemCoreClock )
- #define configTICK_RATE_HZ 1024
- #define configMAX_PRIORITIES ( 3 )
- #define configMINIMAL_STACK_SIZE ( 60 )
- #define configTOTAL_HEAP_SIZE ( 4096 )
- #define configMAX_TASK_NAME_LEN ( 4 )
- #define configUSE_16_BIT_TICKS 0
- #define configIDLE_SHOULD_YIELD 1
- #define configUSE_MUTEXES 1
- #define configUSE_RECURSIVE_MUTEXES 1
- #define configUSE_COUNTING_SEMAPHORES 1
- #define configUSE_ALTERNATIVE_API 0
- #define configQUEUE_REGISTRY_SIZE 2
- #define configUSE_QUEUE_SETS 0
- #define configUSE_TIME_SLICING 0
- #define configUSE_NEWLIB_REENTRANT 0
- #define configENABLE_BACKWARD_COMPATIBILITY 1
- #define configUSE_IDLE_HOOK 0
- #define configUSE_TICK_HOOK 0
- #define configCHECK_FOR_STACK_OVERFLOW 0
- #define configUSE_MALLOC_FAILED_HOOK 0
- #define configGENERATE_RUN_TIME_STATS 0
- #define configUSE_TRACE_FACILITY 0
- #define configUSE_STATS_FORMATTING_FUNCTIONS 0
- #define configUSE_CO_ROUTINES 0
- #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
- #define configUSE_TIMERS 0
- #define configTIMER_TASK_PRIORITY ( 2 )
- #define configTIMER_QUEUE_LENGTH 32
- #define configTIMER_TASK_STACK_DEPTH ( 80 )
- #define configEXPECTED_IDLE_TIME_BEFORE_SLEEP 2
- #if defined(DEBUG_NRF) || defined(DEBUG_NRF_USER)
- #define configASSERT( x ) ASSERT(x)
- #endif
- #define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS 1
- #define INCLUDE_vTaskPrioritySet 1
- #define INCLUDE_uxTaskPriorityGet 1
- #define INCLUDE_vTaskDelete 1
- #define INCLUDE_vTaskSuspend 1
- #define INCLUDE_xResumeFromISR 1
- #define INCLUDE_vTaskDelayUntil 1
- #define INCLUDE_vTaskDelay 1
- #define INCLUDE_xTaskGetSchedulerState 1
- #define INCLUDE_xTaskGetCurrentTaskHandle 1
- #define INCLUDE_uxTaskGetStackHighWaterMark 1
- #define INCLUDE_xTaskGetIdleTaskHandle 1
- #define INCLUDE_xTimerGetTimerDaemonTaskHandle 1
- #define INCLUDE_pcTaskGetTaskName 1
- #define INCLUDE_eTaskGetState 1
- #define INCLUDE_xEventGroupSetBitFromISR 1
- #define INCLUDE_xTimerPendFunctionCall 1
- #define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 0xf
- #define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY _PRIO_APP_HIGH
- #define configKERNEL_INTERRUPT_PRIORITY configLIBRARY_LOWEST_INTERRUPT_PRIORITY
- #define configMAX_SYSCALL_INTERRUPT_PRIORITY configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY
- #define vPortSVCHandler SVC_Handler
- #define xPortPendSVHandler PendSV_Handler
- #if (configTICK_SOURCE == FREERTOS_USE_SYSTICK)
-
-
- #define xPortSysTickHandler SysTick_Handler
- #elif (configTICK_SOURCE == FREERTOS_USE_RTC)
- #define configSYSTICK_CLOCK_HZ ( 32768UL )
- #define xPortSysTickHandler RTC1_IRQHandler
- #else
- #error Unsupported configTICK_SOURCE value
- #endif
- #if !(defined(__ASSEMBLY__) || defined(__ASSEMBLER__))
- #include "nrf.h"
- #include "nrf_assert.h"
-
-
- #ifdef __NVIC_PRIO_BITS
-
- #define configPRIO_BITS __NVIC_PRIO_BITS
- #else
- #error "This port requires __NVIC_PRIO_BITS to be defined"
- #endif
-
- #if (configTICK_SOURCE == FREERTOS_USE_SYSTICK)
- #include <stdint.h>
- extern uint32_t SystemCoreClock;
- #endif
- #endif
- #define configUSE_DISABLE_TICK_AUTO_CORRECTION_DEBUG 0
- #endif
|