os_cfg.h 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /*
  2. ************************************************************************************************************************
  3. * uC/OS-III
  4. * The Real-Time Kernel
  5. *
  6. * (c) Copyright 2009-2011; Micrium, Inc.; Weston, FL
  7. * All rights reserved. Protected by international copyright laws.
  8. *
  9. * CONFIGURATION FILE
  10. *
  11. * File : OS_CFG.H
  12. * By : JJL
  13. * Version : V3.02.00
  14. *
  15. * LICENSING TERMS:
  16. * ---------------
  17. * uC/OS-III is provided in source form for FREE short-term evaluation, for educational use or
  18. * for peaceful research. If you plan or intend to use uC/OS-III in a commercial application/
  19. * product then, you need to contact Micrium to properly license uC/OS-III for its use in your
  20. * application/product. We provide ALL the source code for your convenience and to help you
  21. * experience uC/OS-III. The fact that the source is provided does NOT mean that you can use
  22. * it commercially without paying a licensing fee.
  23. *
  24. * Knowledge of the source code may NOT be used to develop a similar product.
  25. *
  26. * Please help us continue to provide the embedded community with the finest software available.
  27. * Your honesty is greatly appreciated.
  28. *
  29. * You can contact us at www.micrium.com, or by phone at +1 (954) 217-2036.
  30. ************************************************************************************************************************
  31. */
  32. #ifndef OS_CFG_H
  33. #define OS_CFG_H
  34. /* ---------------------------- MISCELLANEOUS -------------------------- */
  35. #define OS_CFG_APP_HOOKS_EN 0u //使能/禁用钩子函数
  36. #define OS_CFG_ARG_CHK_EN 1u //使能/禁用参数检测
  37. #define OS_CFG_CALLED_FROM_ISR_CHK_EN 1u //使能/禁用检测中断中非法调用功能
  38. #define OS_CFG_DBG_EN 1u //使能/禁用调试代码和变量
  39. #define OS_CFG_ISR_POST_DEFERRED_EN 1u //使能/禁用中断延迟发布
  40. #define OS_CFG_OBJ_TYPE_CHK_EN 1u //使能/禁用对象类型检测
  41. #define OS_CFG_TS_EN 1u //使能/禁用时间戳
  42. /* ---------------------------- MISCELLANEOUS -------------------------- */
  43. #define OS_CFG_PEND_MULTI_EN 1u /* Enable (1) or Disable (0) code generation for multi-pend feature */
  44. #define OS_CFG_PRIO_MAX 64u /* 定义优先级的最大值 (see OS_PRIO data type) */
  45. #define OS_CFG_SCHED_LOCK_TIME_MEAS_EN 0u /* Include code to measure scheduler lock time */
  46. #define OS_CFG_SCHED_ROUND_ROBIN_EN 1u //使能/禁用时间片轮转调度
  47. #define OS_CFG_STK_SIZE_MIN 64u /* Minimum allowable task stack size */
  48. /* ----------------------------- EVENT FLAGS --------------------------- */
  49. #define OS_CFG_FLAG_EN 0u //使能/禁用事件标志组
  50. #define OS_CFG_FLAG_DEL_EN 0u //使能/禁用 OSFlagDel() 函数
  51. #define OS_CFG_FLAG_MODE_CLR_EN 0u //使能/禁用标志位清0触发模式
  52. #define OS_CFG_FLAG_PEND_ABORT_EN 0u //使能/禁用 OSFlagPendAbort() 函数
  53. /* -------------------------- MEMORY MANAGEMENT ------------------------ */
  54. #define OS_CFG_MEM_EN 1u /* Enable (1) or Disable (0) code generation for MEMORY MANAGER */
  55. /* --------------------- MUTUAL EXCLUSION SEMAPHORES ------------------- */
  56. #define OS_CFG_MUTEX_EN 0u //使能或禁用互斥信号量
  57. #define OS_CFG_MUTEX_DEL_EN 0u //使能或禁用 OSMutexDel() 函数
  58. #define OS_CFG_MUTEX_PEND_ABORT_EN 0u //使能或禁用 OSMutexPendAbort() 函数
  59. /* --------------------------- MESSAGE QUEUES -------------------------- */
  60. #define OS_CFG_Q_EN 1u //使能/禁用消息队列
  61. #define OS_CFG_Q_DEL_EN 0u //使能或禁用 OSQDel() 函数
  62. #define OS_CFG_Q_FLUSH_EN 0u //使能或禁用 OSQFlush() 函数
  63. #define OS_CFG_Q_PEND_ABORT_EN 0u //使能或禁用 OSQPendAbort() 函数
  64. /* ----------------------------- SEMAPHORES ---------------------------- */
  65. #define OS_CFG_SEM_EN 1u //使能或禁用多值信号量
  66. #define OS_CFG_SEM_DEL_EN 0u //使能或禁用 OSSemDel() 函数
  67. #define OS_CFG_SEM_PEND_ABORT_EN 0u //使能或禁用 OSSemPendAbort() 函数
  68. #define OS_CFG_SEM_SET_EN 0u //使能或禁用 OSSemSet() 函数
  69. /* -------------------------- TASK MANAGEMENT -------------------------- */
  70. #define OS_CFG_STAT_TASK_EN 1u /* 使能或禁用 OS_StatTask() 统计任务函数 */
  71. #define OS_CFG_STAT_TASK_STK_CHK_EN 1u /* Check task stacks from statistic task */
  72. #define OS_CFG_TASK_CHANGE_PRIO_EN 1u /* Include code for OSTaskChangePrio() */
  73. #define OS_CFG_TASK_DEL_EN 1u /* Include code for OSTaskDel() */
  74. #define OS_CFG_TASK_Q_EN 1u /* Include code for OSTaskQXXXX() */
  75. #define OS_CFG_TASK_Q_PEND_ABORT_EN 1u /* Include code for OSTaskQPendAbort() */
  76. #define OS_CFG_TASK_PROFILE_EN 1u /* Include variables in OS_TCB for profiling */
  77. #define OS_CFG_TASK_REG_TBL_SIZE 1u //任务寄存器个数
  78. #define OS_CFG_TASK_SEM_PEND_ABORT_EN 1u /* Include code for OSTaskSemPendAbort() */
  79. #define OS_CFG_TASK_SUSPEND_EN 1u //使能/禁用函数 OSTaskSuspend() 和 OSTaskResume()
  80. /* -------------------------- TIME MANAGEMENT -------------------------- */
  81. #define OS_CFG_TIME_DLY_HMSM_EN 1u //使能/禁用 OSTimeDlyHMSM() 函数
  82. #define OS_CFG_TIME_DLY_RESUME_EN 0u //使能/禁用 OSTimeDlyResume() 函数
  83. /* ------------------------- TIMER MANAGEMENT -------------------------- */
  84. #define OS_CFG_TMR_EN 1u //使能/禁用软件定时器
  85. #define OS_CFG_TMR_DEL_EN 1u //使能/禁用 OSTmrDel() 函数
  86. #endif