chconf.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. #ifndef _CHCONF_H_
  2. #define _CHCONF_H_
  3. #if !defined(CH_FREQUENCY)
  4. #define CH_FREQUENCY 1000
  5. #endif
  6. #if !defined(CH_TIME_QUANTUM)
  7. #define CH_TIME_QUANTUM 20
  8. #endif
  9. #if !defined(CH_MEMCORE_SIZE)
  10. #define CH_MEMCORE_SIZE 0
  11. #endif
  12. #if !defined(CH_NO_IDLE_THREAD)
  13. #define CH_NO_IDLE_THREAD FALSE
  14. #endif
  15. #if !defined(CH_OPTIMIZE_SPEED)
  16. #define CH_OPTIMIZE_SPEED TRUE
  17. #endif
  18. #if !defined(CH_USE_REGISTRY)
  19. #define CH_USE_REGISTRY TRUE
  20. #endif
  21. #if !defined(CH_USE_WAITEXIT)
  22. #define CH_USE_WAITEXIT TRUE
  23. #endif
  24. #if !defined(CH_USE_SEMAPHORES)
  25. #define CH_USE_SEMAPHORES TRUE
  26. #endif
  27. #if !defined(CH_USE_SEMAPHORES_PRIORITY)
  28. #define CH_USE_SEMAPHORES_PRIORITY FALSE
  29. #endif
  30. #if !defined(CH_USE_SEMSW)
  31. #define CH_USE_SEMSW TRUE
  32. #endif
  33. #if !defined(CH_USE_MUTEXES)
  34. #define CH_USE_MUTEXES TRUE
  35. #endif
  36. #if !defined(CH_USE_CONDVARS)
  37. #define CH_USE_CONDVARS TRUE
  38. #endif
  39. #if !defined(CH_USE_CONDVARS_TIMEOUT)
  40. #define CH_USE_CONDVARS_TIMEOUT TRUE
  41. #endif
  42. #if !defined(CH_USE_EVENTS)
  43. #define CH_USE_EVENTS TRUE
  44. #endif
  45. #if !defined(CH_USE_EVENTS_TIMEOUT)
  46. #define CH_USE_EVENTS_TIMEOUT TRUE
  47. #endif
  48. #if !defined(CH_USE_MESSAGES)
  49. #define CH_USE_MESSAGES TRUE
  50. #endif
  51. #if !defined(CH_USE_MESSAGES_PRIORITY)
  52. #define CH_USE_MESSAGES_PRIORITY FALSE
  53. #endif
  54. #if !defined(CH_USE_MAILBOXES)
  55. #define CH_USE_MAILBOXES TRUE
  56. #if !defined(CH_USE_QUEUES)
  57. #define CH_USE_QUEUES TRUE
  58. #endif
  59. #if !defined(CH_USE_MEMCORE)
  60. #define CH_USE_MEMCORE TRUE
  61. #endif
  62. #if !defined(CH_USE_HEAP)
  63. #define CH_USE_HEAP TRUE
  64. #endif
  65. #if !defined(CH_USE_MALLOC_HEAP)
  66. #define CH_USE_MALLOC_HEAP FALSE
  67. #endif
  68. #if !defined(CH_USE_MEMPOOLS)
  69. #define CH_USE_MEMPOOLS TRUE
  70. #endif
  71. #if !defined(CH_USE_DYNAMIC)
  72. #define CH_USE_DYNAMIC TRUE
  73. #endif
  74. #if !defined(CH_DBG_SYSTEM_STATE_CHECK)
  75. #define CH_DBG_SYSTEM_STATE_CHECK FALSE
  76. #endif
  77. #if !defined(CH_DBG_ENABLE_CHECKS)
  78. #define CH_DBG_ENABLE_CHECKS FALSE
  79. #endif
  80. #if !defined(CH_DBG_ENABLE_ASSERTS)
  81. #define CH_DBG_ENABLE_ASSERTS FALSE
  82. #endif
  83. #if !defined(CH_DBG_ENABLE_TRACE)
  84. #define CH_DBG_ENABLE_TRACE FALSE
  85. #endif
  86. #if !defined(CH_DBG_ENABLE_STACK_CHECK)
  87. #define CH_DBG_ENABLE_STACK_CHECK FALSE
  88. #endif
  89. #if !defined(CH_DBG_FILL_THREADS)
  90. #define CH_DBG_FILL_THREADS FALSE
  91. #endif
  92. #if !defined(CH_DBG_THREADS_PROFILING)
  93. #define CH_DBG_THREADS_PROFILING TRUE
  94. #endif
  95. #if !defined(THREAD_EXT_FIELDS)
  96. #define THREAD_EXT_FIELDS \
  97. /* Add threads custom fields here.*/
  98. #endif
  99. #if !defined(THREAD_EXT_INIT_HOOK)
  100. #define THREAD_EXT_INIT_HOOK(tp) { \
  101. /* Add threads initialization code here.*/ \
  102. }
  103. #endif
  104. #if !defined(THREAD_EXT_EXIT_HOOK)
  105. #define THREAD_EXT_EXIT_HOOK(tp) { \
  106. /* Add threads finalization code here.*/ \
  107. }
  108. #endif
  109. #if !defined(THREAD_CONTEXT_SWITCH_HOOK)
  110. #define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \
  111. /* System halt code here.*/ \
  112. }
  113. #endif
  114. #if !defined(IDLE_LOOP_HOOK)
  115. #define IDLE_LOOP_HOOK() { \
  116. /* Idle loop code here.*/ \
  117. }
  118. #endif
  119. #if !defined(SYSTEM_TICK_EVENT_HOOK)
  120. #define SYSTEM_TICK_EVENT_HOOK() { \
  121. /* System tick event code here.*/ \
  122. }
  123. #endif
  124. #if !defined(SYSTEM_HALT_HOOK)
  125. #define SYSTEM_HALT_HOOK() { \
  126. /* System halt code here.*/ \
  127. }
  128. #endif
  129. #define CORTEX_USE_FPU FALSE
  130. #endif