Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 

157 řádky
11 KiB

  1. /*
  2. *********************************************************************************************************
  3. * uC/OS-II
  4. * The Real-Time Kernel
  5. *
  6. * Copyright 1992-2021 Silicon Laboratories Inc. www.silabs.com
  7. *
  8. * SPDX-License-Identifier: APACHE-2.0
  9. *
  10. * This software is subject to an open source license and is distributed by
  11. * Silicon Laboratories Inc. pursuant to the terms of the Apache License,
  12. * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0.
  13. *
  14. *********************************************************************************************************
  15. */
  16. /*
  17. *********************************************************************************************************
  18. *
  19. * uC/OS-II Configuration File for V2.9x
  20. *
  21. * Filename : os_cfg.h
  22. * Version : V2.93.01
  23. *********************************************************************************************************
  24. */
  25. #ifndef OS_CFG_H
  26. #define OS_CFG_H
  27. /* ---------------------- MISCELLANEOUS ----------------------- */
  28. #define OS_APP_HOOKS_EN 0u /* Application-defined hooks are called from the uC/OS-II hooks */
  29. #define OS_ARG_CHK_EN 1u /* Enable (1) or Disable (0) argument checking */
  30. #define OS_CPU_HOOKS_EN 1u /* uC/OS-II hooks are found in the processor port files */
  31. #define OS_DEBUG_EN 0u /* Enable(1) debug variables */
  32. #define OS_EVENT_MULTI_EN 1u /* Include code for OSEventPendMulti() */
  33. #define OS_EVENT_NAME_EN 1u /* Enable names for Sem, Mutex, Mbox and Q */
  34. #define OS_LOWEST_PRIO 63u /* Defines the lowest priority that can be assigned ... */
  35. /* ... MUST NEVER be higher than 254! */
  36. #define OS_MAX_EVENTS 10u /* Max. number of event control blocks in your application */
  37. #define OS_MAX_FLAGS 5u /* Max. number of Event Flag Groups in your application */
  38. #define OS_MAX_MEM_PART 5u /* Max. number of memory partitions */
  39. #define OS_MAX_QS 4u /* Max. number of queue control blocks in your application */
  40. #define OS_MAX_TASKS 20u /* Max. number of tasks in your application, MUST be >= 2 */
  41. #define OS_SCHED_LOCK_EN 1u /* Include code for OSSchedLock() and OSSchedUnlock() */
  42. #define OS_TICK_STEP_EN 1u /* Enable tick stepping feature for uC/OS-View */
  43. #define OS_TICKS_PER_SEC 1000u /* Set the number of ticks in one second */
  44. #define OS_TLS_TBL_SIZE 0u /* Size of Thread-Local Storage Table */
  45. /* --------------------- TASK STACK SIZE ---------------------- */
  46. #define OS_TASK_TMR_STK_SIZE 128u /* Timer task stack size (# of OS_STK wide entries) */
  47. #define OS_TASK_STAT_STK_SIZE 128u /* Statistics task stack size (# of OS_STK wide entries) */
  48. #define OS_TASK_IDLE_STK_SIZE 128u /* Idle task stack size (# of OS_STK wide entries) */
  49. /* --------------------- TASK MANAGEMENT ---------------------- */
  50. #define OS_TASK_CHANGE_PRIO_EN 1u /* Include code for OSTaskChangePrio() */
  51. #define OS_TASK_CREATE_EN 1u /* Include code for OSTaskCreate() */
  52. #define OS_TASK_CREATE_EXT_EN 1u /* Include code for OSTaskCreateExt() */
  53. #define OS_TASK_DEL_EN 1u /* Include code for OSTaskDel() */
  54. #define OS_TASK_NAME_EN 1u /* Enable task names */
  55. #define OS_TASK_PROFILE_EN 1u /* Include variables in OS_TCB for profiling */
  56. #define OS_TASK_QUERY_EN 1u /* Include code for OSTaskQuery() */
  57. #define OS_TASK_REG_TBL_SIZE 1u /* Size of task variables array (#of INT32U entries) */
  58. #define OS_TASK_STAT_EN 1u /* Enable (1) or Disable(0) the statistics task */
  59. #define OS_TASK_STAT_STK_CHK_EN 1u /* Check task stacks from statistic task */
  60. #define OS_TASK_SUSPEND_EN 1u /* Include code for OSTaskSuspend() and OSTaskResume() */
  61. #define OS_TASK_SW_HOOK_EN 1u /* Include code for OSTaskSwHook() */
  62. /* ----------------------- EVENT FLAGS ------------------------ */
  63. #define OS_FLAG_EN 1u /* Enable (1) or Disable (0) code generation for EVENT FLAGS */
  64. #define OS_FLAG_ACCEPT_EN 1u /* Include code for OSFlagAccept() */
  65. #define OS_FLAG_DEL_EN 1u /* Include code for OSFlagDel() */
  66. #define OS_FLAG_NAME_EN 1u /* Enable names for event flag group */
  67. #define OS_FLAG_QUERY_EN 1u /* Include code for OSFlagQuery() */
  68. #define OS_FLAG_WAIT_CLR_EN 1u /* Include code for Wait on Clear EVENT FLAGS */
  69. #define OS_FLAGS_NBITS 16u /* Size in #bits of OS_FLAGS data type (8, 16 or 32) */
  70. /* -------------------- MESSAGE MAILBOXES --------------------- */
  71. #define OS_MBOX_EN 1u /* Enable (1) or Disable (0) code generation for MAILBOXES */
  72. #define OS_MBOX_ACCEPT_EN 1u /* Include code for OSMboxAccept() */
  73. #define OS_MBOX_DEL_EN 1u /* Include code for OSMboxDel() */
  74. #define OS_MBOX_PEND_ABORT_EN 1u /* Include code for OSMboxPendAbort() */
  75. #define OS_MBOX_POST_EN 1u /* Include code for OSMboxPost() */
  76. #define OS_MBOX_POST_OPT_EN 1u /* Include code for OSMboxPostOpt() */
  77. #define OS_MBOX_QUERY_EN 1u /* Include code for OSMboxQuery() */
  78. /* --------------------- MEMORY MANAGEMENT -------------------- */
  79. #define OS_MEM_EN 1u /* Enable (1) or Disable (0) code generation for MEMORY MANAGER */
  80. #define OS_MEM_NAME_EN 1u /* Enable memory partition names */
  81. #define OS_MEM_QUERY_EN 1u /* Include code for OSMemQuery() */
  82. /* ---------------- MUTUAL EXCLUSION SEMAPHORES --------------- */
  83. #define OS_MUTEX_EN 1u /* Enable (1) or Disable (0) code generation for MUTEX */
  84. #define OS_MUTEX_ACCEPT_EN 1u /* Include code for OSMutexAccept() */
  85. #define OS_MUTEX_DEL_EN 1u /* Include code for OSMutexDel() */
  86. #define OS_MUTEX_QUERY_EN 1u /* Include code for OSMutexQuery() */
  87. /* ---------------------- MESSAGE QUEUES ---------------------- */
  88. #define OS_Q_EN 1u /* Enable (1) or Disable (0) code generation for QUEUES */
  89. #define OS_Q_ACCEPT_EN 1u /* Include code for OSQAccept() */
  90. #define OS_Q_DEL_EN 1u /* Include code for OSQDel() */
  91. #define OS_Q_FLUSH_EN 1u /* Include code for OSQFlush() */
  92. #define OS_Q_PEND_ABORT_EN 1u /* Include code for OSQPendAbort() */
  93. #define OS_Q_POST_EN 1u /* Include code for OSQPost() */
  94. #define OS_Q_POST_FRONT_EN 1u /* Include code for OSQPostFront() */
  95. #define OS_Q_POST_OPT_EN 1u /* Include code for OSQPostOpt() */
  96. #define OS_Q_QUERY_EN 1u /* Include code for OSQQuery() */
  97. /* ------------------------ SEMAPHORES ------------------------ */
  98. #define OS_SEM_EN 1u /* Enable (1) or Disable (0) code generation for SEMAPHORES */
  99. #define OS_SEM_ACCEPT_EN 1u /* Include code for OSSemAccept() */
  100. #define OS_SEM_DEL_EN 1u /* Include code for OSSemDel() */
  101. #define OS_SEM_PEND_ABORT_EN 1u /* Include code for OSSemPendAbort() */
  102. #define OS_SEM_QUERY_EN 1u /* Include code for OSSemQuery() */
  103. #define OS_SEM_SET_EN 1u /* Include code for OSSemSet() */
  104. /* --------------------- TIME MANAGEMENT ---------------------- */
  105. #define OS_TIME_DLY_HMSM_EN 1u /* Include code for OSTimeDlyHMSM() */
  106. #define OS_TIME_DLY_RESUME_EN 1u /* Include code for OSTimeDlyResume() */
  107. #define OS_TIME_GET_SET_EN 1u /* Include code for OSTimeGet() and OSTimeSet() */
  108. #define OS_TIME_TICK_HOOK_EN 1u /* Include code for OSTimeTickHook() */
  109. /* --------------------- TIMER MANAGEMENT --------------------- */
  110. #define OS_TMR_EN 1u /* Enable (1) or Disable (0) code generation for TIMERS */
  111. #define OS_TMR_CFG_MAX 16u /* Maximum number of timers */
  112. #define OS_TMR_CFG_NAME_EN 1u /* Determine timer names */
  113. #define OS_TMR_CFG_WHEEL_SIZE 7u /* Size of timer wheel (#Spokes) */
  114. #define OS_TMR_CFG_TICKS_PER_SEC 10u /* Rate at which timer management task runs (Hz) */
  115. /* ---------------------- TRACE RECORDER ---------------------- */
  116. #define OS_TRACE_EN 0u /* Enable (1) or Disable (0) uC/OS-II Trace instrumentation */
  117. #define OS_TRACE_API_ENTER_EN 0u /* Enable (1) or Disable (0) uC/OS-II Trace API enter instrum. */
  118. #define OS_TRACE_API_EXIT_EN 0u /* Enable (1) or Disable (0) uC/OS-II Trace API exit instrum. */
  119. #endif