chconf.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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. #endif
  57. #if !defined(CH_USE_QUEUES)
  58. #define CH_USE_QUEUES TRUE
  59. #endif
  60. #if !defined(CH_USE_MEMCORE)
  61. #define CH_USE_MEMCORE TRUE
  62. #endif
  63. #if !defined(CH_USE_HEAP)
  64. #define CH_USE_HEAP TRUE
  65. #endif
  66. #if !defined(CH_USE_MALLOC_HEAP)
  67. #define CH_USE_MALLOC_HEAP FALSE
  68. #endif
  69. #if !defined(CH_USE_MEMPOOLS)
  70. #define CH_USE_MEMPOOLS TRUE
  71. #endif
  72. #if !defined(CH_USE_DYNAMIC)
  73. #define CH_USE_DYNAMIC TRUE
  74. #endif
  75. #if !defined(CH_DBG_SYSTEM_STATE_CHECK)
  76. #define CH_DBG_SYSTEM_STATE_CHECK FALSE
  77. #endif
  78. #if !defined(CH_DBG_ENABLE_CHECKS)
  79. #define CH_DBG_ENABLE_CHECKS FALSE
  80. #endif
  81. #if !defined(CH_DBG_ENABLE_ASSERTS)
  82. #define CH_DBG_ENABLE_ASSERTS FALSE
  83. #endif
  84. #if !defined(CH_DBG_ENABLE_TRACE)
  85. #define CH_DBG_ENABLE_TRACE FALSE
  86. #endif
  87. #if !defined(CH_DBG_ENABLE_STACK_CHECK)
  88. #define CH_DBG_ENABLE_STACK_CHECK FALSE
  89. #endif
  90. #if !defined(CH_DBG_FILL_THREADS)
  91. #define CH_DBG_FILL_THREADS FALSE
  92. #endif
  93. #if !defined(CH_DBG_THREADS_PROFILING)
  94. #define CH_DBG_THREADS_PROFILING TRUE
  95. #endif
  96. #if !defined(THREAD_EXT_FIELDS)
  97. #define THREAD_EXT_FIELDS \
  98. /* Add threads custom fields here.*/
  99. #endif
  100. #if !defined(THREAD_EXT_INIT_HOOK)
  101. #define THREAD_EXT_INIT_HOOK(tp) { \
  102. /* Add threads initialization code here.*/ \
  103. }
  104. #endif
  105. #if !defined(THREAD_EXT_EXIT_HOOK)
  106. #define THREAD_EXT_EXIT_HOOK(tp) { \
  107. /* Add threads finalization code here.*/ \
  108. }
  109. #endif
  110. #if !defined(THREAD_CONTEXT_SWITCH_HOOK)
  111. #define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \
  112. /* System halt code here.*/ \
  113. }
  114. #endif
  115. #if !defined(IDLE_LOOP_HOOK)
  116. #define IDLE_LOOP_HOOK() { \
  117. /* Idle loop code here.*/ \
  118. }
  119. #endif
  120. #if !defined(SYSTEM_TICK_EVENT_HOOK)
  121. #define SYSTEM_TICK_EVENT_HOOK() { \
  122. /* System tick event code here.*/ \
  123. }
  124. #endif
  125. #if !defined(SYSTEM_HALT_HOOK)
  126. #define SYSTEM_HALT_HOOK() { \
  127. /* System halt code here.*/ \
  128. }
  129. #endif
  130. #define CORTEX_USE_FPU FALSE
  131. #endif