os_cfg_app.h 4.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. * OS CONFIGURATION (APPLICATION SPECIFICS)
  10. *
  11. * File : OS_CFG_APP.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_APP_H
  33. #define OS_CFG_APP_H
  34. /*
  35. ************************************************************************************************************************
  36. * CONSTANTS
  37. ************************************************************************************************************************
  38. */
  39. /* --------------------- MISCELLANEOUS ------------------ */
  40. #define OS_CFG_MSG_POOL_SIZE 100u /* Maximum number of messages */
  41. #define OS_CFG_ISR_STK_SIZE 128u /* Stack size of ISR stack (number of CPU_STK elements) */
  42. #define OS_CFG_TASK_STK_LIMIT_PCT_EMPTY 10u /* Stack limit position in percentage to empty */
  43. /* ---------------------- IDLE TASK --------------------- */
  44. #define OS_CFG_IDLE_TASK_STK_SIZE 64u /* Stack size (number of CPU_STK elements) */
  45. /* ------------------ ISR HANDLER TASK ------------------ */
  46. #define OS_CFG_INT_Q_SIZE 10u /* Size of ISR handler task queue */
  47. #define OS_CFG_INT_Q_TASK_STK_SIZE 128u /* Stack size (number of CPU_STK elements) */
  48. /* ------------------- STATISTIC TASK ------------------- */
  49. #define OS_CFG_STAT_TASK_PRIO 11u /* Priority */
  50. #define OS_CFG_STAT_TASK_RATE_HZ 10u /* Rate of execution (1 to 10 Hz) */
  51. #define OS_CFG_STAT_TASK_STK_SIZE 128u /* Stack size (number of CPU_STK elements) */
  52. /* ------------------------ TICKS ----------------------- */
  53. #define OS_CFG_TICK_RATE_HZ 1000u // 时钟节拍频率 (10 to 1000 Hz)
  54. #define OS_CFG_TICK_TASK_PRIO 10u // 时钟节拍任务 OS_TickTask() 的优先级
  55. #define OS_CFG_TICK_TASK_STK_SIZE 128u // 时钟节拍任务 OS_TickTask() 的栈空间大小(单位:CPU_STK)
  56. #define OS_CFG_TICK_WHEEL_SIZE 17u // OSCfg_TickWheel 数组的大小,推荐使用任务总数/4,且为质数
  57. /* ----------------------- TIMERS ----------------------- */
  58. #define OS_CFG_TMR_TASK_PRIO 11u //定时器任务的优先级
  59. #define OS_CFG_TMR_TASK_RATE_HZ 1u //定时器的时基 (一般不能大于 OS_CFG_TICK_RATE_HZ )
  60. #define OS_CFG_TMR_TASK_STK_SIZE 128u //定时器任务的栈空间大小(单位:CPU_STK)
  61. #define OS_CFG_TMR_WHEEL_SIZE 17u // OSCfg_TmrWheel 数组的大小,推荐使用任务总数/4,且为质数
  62. #endif