FreeRTOSConfig.h 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. /*
  2. * FreeRTOS V202112.00
  3. * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  4. *
  5. * Permission is hereby granted, free of charge, to any person obtaining a copy of
  6. * this software and associated documentation files (the "Software"), to deal in
  7. * the Software without restriction, including without limitation the rights to
  8. * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
  9. * the Software, and to permit persons to whom the Software is furnished to do so,
  10. * subject to the following conditions:
  11. *
  12. * The above copyright notice and this permission notice shall be included in all
  13. * copies or substantial portions of the Software.
  14. *
  15. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
  17. * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
  18. * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
  19. * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  20. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  21. *
  22. * https://www.FreeRTOS.org
  23. * https://aws.amazon.com/freertos
  24. *
  25. */
  26. #ifndef FREERTOS_CONFIG_H
  27. #define FREERTOS_CONFIG_H
  28. /*-----------------------------------------------------------
  29. * Application specific definitions.
  30. *
  31. * These definitions should be adjusted for your particular hardware and
  32. * application requirements.
  33. *
  34. * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
  35. * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
  36. *
  37. * See http://www.freertos.org/a00110.html
  38. *----------------------------------------------------------*/
  39. //not used
  40. #define configUSE_PREEMPTION 1
  41. #define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
  42. #define configUSE_QUEUE_SETS 1
  43. #define configUSE_IDLE_HOOK 0
  44. #define configUSE_TICK_HOOK 1
  45. #define configCPU_CLOCK_HZ ( SystemCoreClock )
  46. #define configTICK_RATE_HZ ( 1000 )
  47. #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 )
  48. #define configMAX_TASK_NAME_LEN ( 10 )
  49. #define configUSE_TRACE_FACILITY 1
  50. #define configUSE_16_BIT_TICKS 0
  51. #define configIDLE_SHOULD_YIELD 1
  52. #define configQUEUE_REGISTRY_SIZE 8
  53. #define configCHECK_FOR_STACK_OVERFLOW 2
  54. /* The full demo always has tasks to run so the tick will never be turned off.
  55. The blinky demo will use the default tickless idle implementation to turn the
  56. tick off. */
  57. #define configUSE_TICKLESS_IDLE 0
  58. /* Run time stats gathering definitions. */
  59. #define configGENERATE_RUN_TIME_STATS 0
  60. /* This demo makes use of one or more example stats formatting functions. These
  61. format the raw data provided by the uxTaskGetSystemState() function in to human
  62. readable ASCII form. See the notes in the implementation of vTaskList() within
  63. FreeRTOS/Source/tasks.c for limitations. */
  64. #define configUSE_STATS_FORMATTING_FUNCTIONS 1
  65. /* Co-routine definitions. */
  66. #define configUSE_CO_ROUTINES 0
  67. #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
  68. /* Software timer definitions. */
  69. #define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
  70. #define configTIMER_QUEUE_LENGTH 5
  71. #define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 2 )
  72. /* Set the following definitions to 1 to include the API function, or zero
  73. to exclude the API function. */
  74. #define INCLUDE_vTaskCleanUpResources 1
  75. #define INCLUDE_xTimerPendFunctionCall 1
  76. /* Cortex-M specific definitions. */
  77. #ifdef __NVIC_PRIO_BITS
  78. /* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */
  79. #define configPRIO_BITS __NVIC_PRIO_BITS
  80. #else
  81. #define configPRIO_BITS 4 /* 15 priority levels */
  82. #endif
  83. /* The lowest interrupt priority that can be used in a call to a "set priority"
  84. function. */
  85. #define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 15
  86. /* The highest interrupt priority that can be used by any interrupt service
  87. routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL
  88. INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER
  89. PRIORITY THAN THIS! (higher priorities are lower numeric values. */
  90. #define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 4
  91. /* Interrupt priorities used by the kernel port layer itself. These are generic
  92. to all Cortex-M ports, and do not rely on any particular library functions. */
  93. #define configKERNEL_INTERRUPT_PRIORITY ( configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
  94. /* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
  95. See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
  96. #define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
  97. /* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
  98. standard names. */
  99. #define xPortPendSVHandler PendSV_Handler
  100. #define vPortSVCHandler SVC_Handler
  101. #define xPortSysTickHandler SysTick_Handler
  102. //used
  103. #define configUSE_MUTEXES 1
  104. #define configSUPPORT_DYNAMIC_ALLOCATION 1
  105. #define configSUPPORT_STATIC_ALLOCATION 1
  106. #define configUSE_RECURSIVE_MUTEXES 1
  107. #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 46 * 1024 ) )
  108. #define configUSE_COUNTING_SEMAPHORES 1
  109. #define configUSE_MALLOC_FAILED_HOOK 0
  110. #define INCLUDE_vTaskDelete 1
  111. #define INCLUDE_vTaskDelayUntil 1
  112. #define INCLUDE_vTaskDelay 1
  113. #define INCLUDE_vTaskSuspend 1
  114. #define INCLUDE_xTaskResumeFromISR 1
  115. #define INCLUDE_vTaskPrioritySet 1
  116. #define INCLUDE_uxTaskPriorityGet 1
  117. #define INCLUDE_xTaskGetCurrentTaskHandle 1
  118. #define INCLUDE_xTaskAbortDelay 1
  119. #define INCLUDE_xTaskGetHandle 1
  120. #define configUSE_APPLICATION_TASK_TAG 1
  121. #define INCLUDE_xTaskGetIdleTaskHandle 1
  122. #define INCLUDE_uxTaskGetStackHighWaterMark 1
  123. #define INCLUDE_uxTaskGetStackHighWaterMark2 1
  124. #define configUSE_TASK_NOTIFICATIONS 1
  125. #define INCLUDE_eTaskGetState 1
  126. #define configMAX_PRIORITIES ( 32 )
  127. #define configUSE_TIMERS 1
  128. #define INCLUDE_xTaskGetSchedulerState 1
  129. #define INCLUDE_xSemaphoreGetMutexHolder 1
  130. #endif /* FREERTOS_CONFIG_H */