| 1 | /* |
|---|
| 2 | ********************************************************************************************************* |
|---|
| 3 | * uC/OS-II |
|---|
| 4 | * The Real-Time Kernel |
|---|
| 5 | * uC/OS-II Configuration File for V2.8x |
|---|
| 6 | * |
|---|
| 7 | * (c) Copyright 2005-2007, Micrium, Weston, FL |
|---|
| 8 | * All Rights Reserved |
|---|
| 9 | * |
|---|
| 10 | * |
|---|
| 11 | * File : OS_CFG.H |
|---|
| 12 | * By : Jean J. Labrosse |
|---|
| 13 | * Version : V2.86 |
|---|
| 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 Micriµm 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 | |
|---|
| 25 | #ifndef OS_CFG_H |
|---|
| 26 | #define OS_CFG_H |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | /* ---------------------- MISCELLANEOUS ----------------------- */ |
|---|
| 30 | #define OS_APP_HOOKS_EN 0 /* Application-defined hooks are called from the uC/OS-II hooks */ |
|---|
| 31 | #define OS_ARG_CHK_EN 0 /* Enable (1) or Disable (0) argument checking */ |
|---|
| 32 | #define OS_CPU_HOOKS_EN 1 /* uC/OS-II hooks are found in the processor port files */ |
|---|
| 33 | |
|---|
| 34 | #define OS_DEBUG_EN 0 /* Enable(1) debug variables */ |
|---|
| 35 | |
|---|
| 36 | #define OS_EVENT_MULTI_EN 0 /* Include code for OSEventPendMulti() */ |
|---|
| 37 | #define OS_EVENT_NAME_SIZE 16 /* Determine the size of the name of a Sem, Mutex, Mbox or Q */ |
|---|
| 38 | |
|---|
| 39 | #define OS_LOWEST_PRIO 254 /* Defines the lowest priority that can be assigned ... */ |
|---|
| 40 | /* ... MUST NEVER be higher than 254! */ |
|---|
| 41 | #define OS_MAX_EVENTS 1024 /* Max. number of event control blocks in your application */ |
|---|
| 42 | #define OS_MAX_FLAGS 64 /* Max. number of Event Flag Groups in your application */ |
|---|
| 43 | #define OS_MAX_MEM_PART 5 /* Max. number of memory partitions */ |
|---|
| 44 | #define OS_MAX_QS 1024 /* Max. number of queue control blocks in your application */ |
|---|
| 45 | //#define OS_MAX_TASKS 20 /* Max. number of tasks in your application, MUST be >= 2 */ |
|---|
| 46 | //RLQ |
|---|
| 47 | #define OS_MAX_TASKS 128 /* Max. number of tasks in your application, MUST be >= 2 */ |
|---|
| 48 | |
|---|
| 49 | #define OS_SCHED_LOCK_EN 1 /* Include code for OSSchedLock() and OSSchedUnlock() */ |
|---|
| 50 | |
|---|
| 51 | #define OS_TICK_STEP_EN 1 /* Enable tick stepping feature for uC/OS-View */ |
|---|
| 52 | #define OS_TICKS_PER_SEC 200 /* Set the number of ticks in one second */ |
|---|
| 53 | |
|---|
| 54 | |
|---|
| 55 | /* --------------------- TASK STACK SIZE ---------------------- */ |
|---|
| 56 | #define OS_TASK_TMR_STK_SIZE 128 /* Timer task stack size (# of OS_STK wide entries) */ |
|---|
| 57 | #define OS_TASK_STAT_STK_SIZE 128 /* Statistics task stack size (# of OS_STK wide entries) */ |
|---|
| 58 | #define OS_TASK_IDLE_STK_SIZE 128 /* Idle task stack size (# of OS_STK wide entries) */ |
|---|
| 59 | |
|---|
| 60 | |
|---|
| 61 | /* --------------------- TASK MANAGEMENT ---------------------- */ |
|---|
| 62 | #define OS_TASK_CHANGE_PRIO_EN 1 /* Include code for OSTaskChangePrio() */ |
|---|
| 63 | #define OS_TASK_CREATE_EN 1 /* Include code for OSTaskCreate() */ |
|---|
| 64 | #define OS_TASK_CREATE_EXT_EN 1 /* Include code for OSTaskCreateExt() */ |
|---|
| 65 | #define OS_TASK_DEL_EN 1 /* Include code for OSTaskDel() */ |
|---|
| 66 | #define OS_TASK_NAME_SIZE 16 /* Determine the size of a task name */ |
|---|
| 67 | #define OS_TASK_PROFILE_EN 1 /* Include variables in OS_TCB for profiling */ |
|---|
| 68 | #define OS_TASK_QUERY_EN 1 /* Include code for OSTaskQuery() */ |
|---|
| 69 | #define OS_TASK_STAT_EN 1 /* Enable (1) or Disable(0) the statistics task */ |
|---|
| 70 | #define OS_TASK_STAT_STK_CHK_EN 0 /* Check task stacks from statistic task */ |
|---|
| 71 | #define OS_TASK_SUSPEND_EN 1 /* Include code for OSTaskSuspend() and OSTaskResume() */ |
|---|
| 72 | //#define OS_TASK_SW_HOOK_EN 1 /* Include code for OSTaskSwHook() */ |
|---|
| 73 | |
|---|
| 74 | |
|---|
| 75 | /* ----------------------- EVENT FLAGS ------------------------ */ |
|---|
| 76 | #define OS_FLAG_EN 1 /* Enable (1) or Disable (0) code generation for EVENT FLAGS */ |
|---|
| 77 | #define OS_FLAG_ACCEPT_EN 1 /* Include code for OSFlagAccept() */ |
|---|
| 78 | #define OS_FLAG_DEL_EN 1 /* Include code for OSFlagDel() */ |
|---|
| 79 | #define OS_FLAG_NAME_SIZE 16 /* Determine the size of the name of an event flag group */ |
|---|
| 80 | #define OS_FLAG_QUERY_EN 1 /* Include code for OSFlagQuery() */ |
|---|
| 81 | #define OS_FLAG_WAIT_CLR_EN 1 /* Include code for Wait on Clear EVENT FLAGS */ |
|---|
| 82 | #define OS_FLAGS_NBITS 16 /* Size in #bits of OS_FLAGS data type (8, 16 or 32) */ |
|---|
| 83 | |
|---|
| 84 | |
|---|
| 85 | /* -------------------- MESSAGE MAILBOXES --------------------- */ |
|---|
| 86 | #define OS_MBOX_EN 1 /* Enable (1) or Disable (0) code generation for MAILBOXES */ |
|---|
| 87 | #define OS_MBOX_ACCEPT_EN 1 /* Include code for OSMboxAccept() */ |
|---|
| 88 | #define OS_MBOX_DEL_EN 1 /* Include code for OSMboxDel() */ |
|---|
| 89 | #define OS_MBOX_PEND_ABORT_EN 1 /* Include code for OSMboxPendAbort() */ |
|---|
| 90 | #define OS_MBOX_POST_EN 1 /* Include code for OSMboxPost() */ |
|---|
| 91 | #define OS_MBOX_POST_OPT_EN 1 /* Include code for OSMboxPostOpt() */ |
|---|
| 92 | #define OS_MBOX_QUERY_EN 1 /* Include code for OSMboxQuery() */ |
|---|
| 93 | |
|---|
| 94 | |
|---|
| 95 | /* --------------------- MEMORY MANAGEMENT -------------------- */ |
|---|
| 96 | #define OS_MEM_EN 1 /* Enable (1) or Disable (0) code generation for MEMORY MANAGER */ |
|---|
| 97 | #define OS_MEM_NAME_SIZE 16 /* Determine the size of a memory partition name */ |
|---|
| 98 | #define OS_MEM_QUERY_EN 1 /* Include code for OSMemQuery() */ |
|---|
| 99 | |
|---|
| 100 | |
|---|
| 101 | /* ---------------- MUTUAL EXCLUSION SEMAPHORES --------------- */ |
|---|
| 102 | #define OS_MUTEX_EN 1 /* Enable (1) or Disable (0) code generation for MUTEX */ |
|---|
| 103 | #define OS_MUTEX_ACCEPT_EN 1 /* Include code for OSMutexAccept() */ |
|---|
| 104 | #define OS_MUTEX_DEL_EN 1 /* Include code for OSMutexDel() */ |
|---|
| 105 | #define OS_MUTEX_QUERY_EN 1 /* Include code for OSMutexQuery() */ |
|---|
| 106 | |
|---|
| 107 | |
|---|
| 108 | /* ---------------------- MESSAGE QUEUES ---------------------- */ |
|---|
| 109 | #define OS_Q_EN 1 /* Enable (1) or Disable (0) code generation for QUEUES */ |
|---|
| 110 | #define OS_Q_ACCEPT_EN 1 /* Include code for OSQAccept() */ |
|---|
| 111 | #define OS_Q_DEL_EN 1 /* Include code for OSQDel() */ |
|---|
| 112 | #define OS_Q_FLUSH_EN 1 /* Include code for OSQFlush() */ |
|---|
| 113 | #define OS_Q_PEND_ABORT_EN 1 /* Include code for OSQPendAbort() */ |
|---|
| 114 | #define OS_Q_POST_EN 1 /* Include code for OSQPost() */ |
|---|
| 115 | #define OS_Q_POST_FRONT_EN 1 /* Include code for OSQPostFront() */ |
|---|
| 116 | #define OS_Q_POST_OPT_EN 1 /* Include code for OSQPostOpt() */ |
|---|
| 117 | #define OS_Q_QUERY_EN 1 /* Include code for OSQQuery() */ |
|---|
| 118 | |
|---|
| 119 | |
|---|
| 120 | /* ------------------------ SEMAPHORES ------------------------ */ |
|---|
| 121 | #define OS_SEM_EN 1 /* Enable (1) or Disable (0) code generation for SEMAPHORES */ |
|---|
| 122 | #define OS_SEM_ACCEPT_EN 1 /* Include code for OSSemAccept() */ |
|---|
| 123 | #define OS_SEM_DEL_EN 1 /* Include code for OSSemDel() */ |
|---|
| 124 | #define OS_SEM_PEND_ABORT_EN 1 /* Include code for OSSemPendAbort() */ |
|---|
| 125 | #define OS_SEM_QUERY_EN 1 /* Include code for OSSemQuery() */ |
|---|
| 126 | #define OS_SEM_SET_EN 1 /* Include code for OSSemSet() */ |
|---|
| 127 | |
|---|
| 128 | |
|---|
| 129 | /* --------------------- TIME MANAGEMENT ---------------------- */ |
|---|
| 130 | #define OS_TIME_DLY_HMSM_EN 1 /* Include code for OSTimeDlyHMSM() */ |
|---|
| 131 | #define OS_TIME_DLY_RESUME_EN 1 /* Include code for OSTimeDlyResume() */ |
|---|
| 132 | #define OS_TIME_GET_SET_EN 1 /* Include code for OSTimeGet() and OSTimeSet() */ |
|---|
| 133 | #define OS_TIME_TICK_HOOK_EN 1 /* Include code for OSTimeTickHook() */ |
|---|
| 134 | |
|---|
| 135 | |
|---|
| 136 | /* --------------------- TIMER MANAGEMENT --------------------- */ |
|---|
| 137 | #define OS_TMR_EN 1 /* Enable (1) or Disable (0) code generation for TIMERS */ |
|---|
| 138 | #define OS_TMR_CFG_MAX 16 /* Maximum number of timers */ |
|---|
| 139 | #define OS_TMR_CFG_NAME_SIZE 16 /* Determine the size of a timer name */ |
|---|
| 140 | #define OS_TMR_CFG_WHEEL_SIZE 8 /* Size of timer wheel (#Spokes) */ |
|---|
| 141 | #define OS_TMR_CFG_TICKS_PER_SEC 200 /* Rate at which timer management task runs (Hz) */ |
|---|
| 142 | |
|---|
| 143 | /* set any of these to > 1 to supply external hook, when they are left at 1 |
|---|
| 144 | internal simple hook implemenations are used */ |
|---|
| 145 | |
|---|
| 146 | #define OS_TASK_CREATE_HOOK_EN 2 |
|---|
| 147 | #define OS_TASK_DEL_HOOK_EN 1 |
|---|
| 148 | #define OS_TASK_SW_HOOK_EN 2 |
|---|
| 149 | #define OS_TASK_STAT_HOOK_EN 1 |
|---|
| 150 | #define OS_INIT_HOOK_BEGIN_EN 1 |
|---|
| 151 | #define OS_INIT_HOOK_END_EN 1 |
|---|
| 152 | #define OS_TCB_INIT_HOOK_EN 1 |
|---|
| 153 | #define OS_TASK_IDLE_HOOK_EN 1 |
|---|
| 154 | |
|---|
| 155 | #endif |
|---|
| 156 | |
|---|
| 157 | /* Please do not remove! */ |
|---|
| 158 | /* Local Variables: */ |
|---|
| 159 | /* mode: C */ |
|---|
| 160 | /* indent-tabs-mode: nil */ |
|---|
| 161 | /* End: */ |
|---|