No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 

146 líneas
10 KiB

  1. /*
  2. *********************************************************************************************************
  3. * uC/OS-II
  4. * The Real-Time Kernel
  5. * uC/OS-II Configuration File for V2.9x
  6. *
  7. * (c) Copyright 2005-2014, Micrium, Weston, FL
  8. * All Rights Reserved
  9. *
  10. *
  11. * File : OS_CFG.H
  12. * By : Jean J. Labrosse
  13. * Version : V2.92.11
  14. *
  15. * LICENSING TERMS:
  16. * ---------------
  17. * uC/OS-II is provided in source form for FREE evaluation, for educational use or for peaceful research.
  18. * If you plan on using uC/OS-II in a commercial product you need to contact Micrium to properly license
  19. * its use in your product. We provide ALL the source code for your convenience and to help you experience
  20. * uC/OS-II. The fact that the source is provided does NOT mean that you can use it without paying a
  21. * licensing fee.
  22. *********************************************************************************************************
  23. */
  24. #ifndef OS_CFG_H
  25. #define OS_CFG_H
  26. /* ---------------------- MISCELLANEOUS ----------------------- */
  27. #define OS_APP_HOOKS_EN 0u /* 初次移植不使用应用层钩子函数 */
  28. #define OS_ARG_CHK_EN 0u /* Enable (1) or Disable (0) argument checking */
  29. #define OS_CPU_HOOKS_EN 1u /* 使用Cortex-M4端口提供的CPU钩子函数 */
  30. #define OS_DEBUG_EN 1u /* Enable(1) debug variables */
  31. #define OS_EVENT_MULTI_EN 1u /* Include code for OSEventPendMulti() */
  32. #define OS_EVENT_NAME_EN 1u /* Enable names for Sem, Mutex, Mbox and Q */
  33. #define OS_LOWEST_PRIO 63u /* Defines the lowest priority that can be assigned ... */
  34. /* ... MUST NEVER be higher than 254! */
  35. #define OS_MAX_EVENTS 20u /* Max. number of event control blocks in your application */
  36. #define OS_MAX_FLAGS 5u /* Max. number of Event Flag Groups in your application */
  37. #define OS_MAX_MEM_PART 5u /* Max. number of memory partitions */
  38. #define OS_MAX_QS 4u /* Max. number of queue control blocks in your application */
  39. #define OS_MAX_TASKS 10u /* 应用最多可创建10个任务(不包括内核自动创建的系统任务) */
  40. #define OS_SCHED_LOCK_EN 1u /* Include code for OSSchedLock() and OSSchedUnlock() */
  41. #define OS_TICK_STEP_EN 1u /* Enable tick stepping feature for uC/OS-View */
  42. #define OS_TICKS_PER_SEC 1000u /* 每秒1000个节拍,即每个系统节拍为1ms */
  43. #define OS_TLS_TBL_SIZE 0u /* Size of Thread-Local Storage Table */
  44. /* --------------------- TASK STACK SIZE ---------------------- */
  45. #define OS_TASK_TMR_STK_SIZE 128u /* Timer task stack size (# of OS_STK wide entries) */
  46. #define OS_TASK_STAT_STK_SIZE 128u /* Statistics task stack size (# of OS_STK wide entries) */
  47. #define OS_TASK_IDLE_STK_SIZE 128u /* Idle task stack size (# of OS_STK wide entries) */
  48. /* --------------------- TASK MANAGEMENT ---------------------- */
  49. #define OS_TASK_CHANGE_PRIO_EN 1u /* Include code for OSTaskChangePrio() */
  50. #define OS_TASK_CREATE_EN 1u /* Include code for OSTaskCreate() */
  51. #define OS_TASK_CREATE_EXT_EN 1u /* Include code for OSTaskCreateExt() */
  52. #define OS_TASK_DEL_EN 1u /* Include code for OSTaskDel() */
  53. #define OS_TASK_NAME_EN 1u /* Enable task names */
  54. #define OS_TASK_PROFILE_EN 1u /* Include variables in OS_TCB for profiling */
  55. #define OS_TASK_QUERY_EN 1u /* Include code for OSTaskQuery() */
  56. #define OS_TASK_REG_TBL_SIZE 1u /* Size of task variables array (#of INT32U entries) */
  57. #define OS_TASK_STAT_EN 0u /* 初次移植关闭CPU使用率统计任务 */
  58. #define OS_TASK_STAT_STK_CHK_EN 0u /* 统计任务关闭时同时关闭它的周期栈检查 */
  59. #define OS_TASK_SUSPEND_EN 1u /* Include code for OSTaskSuspend() and OSTaskResume() */
  60. #define OS_TASK_SW_HOOK_EN 1u /* Include code for OSTaskSwHook() */
  61. /* ----------------------- EVENT FLAGS ------------------------ */
  62. #define OS_FLAG_EN 1u /* Enable (1) or Disable (0) code generation for EVENT FLAGS */
  63. #define OS_FLAG_ACCEPT_EN 1u /* Include code for OSFlagAccept() */
  64. #define OS_FLAG_DEL_EN 1u /* Include code for OSFlagDel() */
  65. #define OS_FLAG_NAME_EN 1u /* Enable names for event flag group */
  66. #define OS_FLAG_QUERY_EN 1u /* Include code for OSFlagQuery() */
  67. #define OS_FLAG_WAIT_CLR_EN 1u /* Include code for Wait on Clear EVENT FLAGS */
  68. #define OS_FLAGS_NBITS 16u /* Size in #bits of OS_FLAGS data type (8, 16 or 32) */
  69. /* -------------------- MESSAGE MAILBOXES --------------------- */
  70. #define OS_MBOX_EN 1u /* Enable (1) or Disable (0) code generation for MAILBOXES */
  71. #define OS_MBOX_ACCEPT_EN 1u /* Include code for OSMboxAccept() */
  72. #define OS_MBOX_DEL_EN 1u /* Include code for OSMboxDel() */
  73. #define OS_MBOX_PEND_ABORT_EN 1u /* Include code for OSMboxPendAbort() */
  74. #define OS_MBOX_POST_EN 1u /* Include code for OSMboxPost() */
  75. #define OS_MBOX_POST_OPT_EN 1u /* Include code for OSMboxPostOpt() */
  76. #define OS_MBOX_QUERY_EN 1u /* Include code for OSMboxQuery() */
  77. /* --------------------- MEMORY MANAGEMENT -------------------- */
  78. #define OS_MEM_EN 0u /* Enable (1) or Disable (0) code generation for MEMORY MANAGER */
  79. #define OS_MEM_NAME_EN 1u /* Enable memory partition names */
  80. #define OS_MEM_QUERY_EN 1u /* Include code for OSMemQuery() */
  81. /* ---------------- MUTUAL EXCLUSION SEMAPHORES --------------- */
  82. #define OS_MUTEX_EN 1u /* Enable (1) or Disable (0) code generation for MUTEX */
  83. #define OS_MUTEX_ACCEPT_EN 1u /* Include code for OSMutexAccept() */
  84. #define OS_MUTEX_DEL_EN 1u /* Include code for OSMutexDel() */
  85. #define OS_MUTEX_QUERY_EN 1u /* Include code for OSMutexQuery() */
  86. /* ---------------------- MESSAGE QUEUES ---------------------- */
  87. #define OS_Q_EN 1u /* Enable (1) or Disable (0) code generation for QUEUES */
  88. #define OS_Q_ACCEPT_EN 1u /* Include code for OSQAccept() */
  89. #define OS_Q_DEL_EN 1u /* Include code for OSQDel() */
  90. #define OS_Q_FLUSH_EN 1u /* Include code for OSQFlush() */
  91. #define OS_Q_PEND_ABORT_EN 1u /* Include code for OSQPendAbort() */
  92. #define OS_Q_POST_EN 1u /* Include code for OSQPost() */
  93. #define OS_Q_POST_FRONT_EN 1u /* Include code for OSQPostFront() */
  94. #define OS_Q_POST_OPT_EN 1u /* Include code for OSQPostOpt() */
  95. #define OS_Q_QUERY_EN 1u /* Include code for OSQQuery() */
  96. /* ------------------------ SEMAPHORES ------------------------ */
  97. #define OS_SEM_EN 1u /* Enable (1) or Disable (0) code generation for SEMAPHORES */
  98. #define OS_SEM_ACCEPT_EN 1u /* Include code for OSSemAccept() */
  99. #define OS_SEM_DEL_EN 1u /* Include code for OSSemDel() */
  100. #define OS_SEM_PEND_ABORT_EN 1u /* Include code for OSSemPendAbort() */
  101. #define OS_SEM_QUERY_EN 1u /* Include code for OSSemQuery() */
  102. #define OS_SEM_SET_EN 1u /* Include code for OSSemSet() */
  103. /* --------------------- TIME MANAGEMENT ---------------------- */
  104. #define OS_TIME_DLY_HMSM_EN 1u /* Include code for OSTimeDlyHMSM() */
  105. #define OS_TIME_DLY_RESUME_EN 1u /* Include code for OSTimeDlyResume() */
  106. #define OS_TIME_GET_SET_EN 1u /* Include code for OSTimeGet() and OSTimeSet() */
  107. #define OS_TIME_TICK_HOOK_EN 1u /* Include code for OSTimeTickHook() */
  108. /* --------------------- TIMER MANAGEMENT --------------------- */
  109. #define OS_TMR_EN 0u /* Enable (1) or Disable (0) code generation for TIMERS */
  110. #define OS_TMR_CFG_MAX 16u /* Maximum number of timers */
  111. #define OS_TMR_CFG_NAME_EN 1u /* Determine timer names */
  112. #define OS_TMR_CFG_WHEEL_SIZE 7u /* Size of timer wheel (#Spokes) */
  113. #define OS_TMR_CFG_TICKS_PER_SEC 10u /* Rate at which timer management task runs (Hz) */
  114. #endif