00001 /* 00002 ********************************************************************************************************* 00003 * uC/OS-II 00004 * The Real-Time Kernel 00005 * uC/OS-II Configuration File for V2.8x 00006 * 00007 * (c) Copyright 2005-2007, Micrium, Weston, FL 00008 * All Rights Reserved 00009 * 00010 * 00011 * File : OS_CFG.H 00012 * By : Jean J. Labrosse 00013 * Version : V2.86 00014 * 00015 * LICENSING TERMS: 00016 * --------------- 00017 * uC/OS-II is provided in source form for FREE evaluation, for educational use or for peaceful research. 00018 * If you plan on using uC/OS-II in a commercial product you need to contact Micriµm to properly license 00019 * its use in your product. We provide ALL the source code for your convenience and to help you experience 00020 * uC/OS-II. The fact that the source is provided does NOT mean that you can use it without paying a 00021 * licensing fee. 00022 ********************************************************************************************************* 00023 */ 00024 00025 #ifndef OS_CFG_H 00026 #define OS_CFG_H 00027 00028 #define CPU_CLOCK_HZ 3686400 00029 00030 /* ---------------------- MISCELLANEOUS ----------------------- */ 00031 #define OS_APP_HOOKS_EN 0 /* Application-defined hooks are called from the uC/OS-II hooks */ 00032 #define OS_ARG_CHK_EN 0 /* Enable (1) or Disable (0) argument checking */ 00033 #define OS_CPU_HOOKS_EN 1 /* uC/OS-II hooks are found in the processor port files */ 00034 00035 #define OS_DEBUG_EN 1 /* Enable(1) debug variables */ 00036 00037 #define OS_EVENT_MULTI_EN 1 /* Include code for OSEventPendMulti() */ 00038 #define OS_EVENT_NAME_SIZE 16 /* Determine the size of the name of a Sem, Mutex, Mbox or Q */ 00039 00040 #define OS_LOWEST_PRIO 14 /* Defines the lowest priority that can be assigned ... */ 00041 /* ... MUST NEVER be higher than 254! */ 00042 00043 #define OS_MAX_EVENTS 10 /* Max. number of event control blocks in your application */ 00044 #define OS_MAX_FLAGS 5 /* Max. number of Event Flag Groups in your application */ 00045 #define OS_MAX_MEM_PART 5 /* Max. number of memory partitions */ 00046 #define OS_MAX_QS 4 /* Max. number of queue control blocks in your application */ 00047 #define OS_MAX_TASKS 7 /* Max. number of tasks in your application, MUST be >= 2 */ 00048 00049 #define OS_SCHED_LOCK_EN 1 /* Include code for OSSchedLock() and OSSchedUnlock() */ 00050 00051 #define OS_TICK_STEP_EN 1 /* Enable tick stepping feature for uC/OS-View */ 00052 #define OS_TICKS_PER_SEC 100 /* Set the number of ticks in one second */ 00053 00054 00055 /* --------------------- TASK STACK SIZE ---------------------- */ 00056 #define OS_TASK_TMR_STK_SIZE 224 /* Timer task stack size (# of OS_STK wide entries) */ 00057 #define OS_TASK_STAT_STK_SIZE 224 /* Statistics task stack size (# of OS_STK wide entries) */ 00058 #define OS_TASK_IDLE_STK_SIZE 224 /* Idle task stack size (# of OS_STK wide entries) */ 00059 00060 00061 /* --------------------- TASK MANAGEMENT ---------------------- */ 00062 #define OS_TASK_CHANGE_PRIO_EN 1 /* Include code for OSTaskChangePrio() */ 00063 #define OS_TASK_CREATE_EN 1 /* Include code for OSTaskCreate() */ 00064 #define OS_TASK_CREATE_EXT_EN 1 /* Include code for OSTaskCreateExt() */ 00065 #define OS_TASK_DEL_EN 1 /* Include code for OSTaskDel() */ 00066 #define OS_TASK_NAME_SIZE 16 /* Determine the size of a task name */ 00067 #define OS_TASK_PROFILE_EN 1 /* Include variables in OS_TCB for profiling */ 00068 #define OS_TASK_QUERY_EN 1 /* Include code for OSTaskQuery() */ 00069 #define OS_TASK_STAT_EN 1 /* Enable (1) or Disable(0) the statistics task */ 00070 #define OS_TASK_STAT_STK_CHK_EN 1 /* Check task stacks from statistic task */ 00071 #define OS_TASK_SUSPEND_EN 1 /* Include code for OSTaskSuspend() and OSTaskResume() */ 00072 #define OS_TASK_SW_HOOK_EN 1 /* Include code for OSTaskSwHook() */ 00073 00074 00075 /* ----------------------- EVENT FLAGS ------------------------ */ 00076 #define OS_FLAG_EN 0 /* Enable (1) or Disable (0) code generation for EVENT FLAGS */ 00077 #define OS_FLAG_ACCEPT_EN 1 /* Include code for OSFlagAccept() */ 00078 #define OS_FLAG_DEL_EN 1 /* Include code for OSFlagDel() */ 00079 #define OS_FLAG_NAME_SIZE 16 /* Determine the size of the name of an event flag group */ 00080 #define OS_FLAG_QUERY_EN 1 /* Include code for OSFlagQuery() */ 00081 #define OS_FLAG_WAIT_CLR_EN 1 /* Include code for Wait on Clear EVENT FLAGS */ 00082 #define OS_FLAGS_NBITS 16 /* Size in #bits of OS_FLAGS data type (8, 16 or 32) */ 00083 00084 00085 /* -------------------- MESSAGE MAILBOXES --------------------- */ 00086 #define OS_MBOX_EN 0 /* Enable (1) or Disable (0) code generation for MAILBOXES */ 00087 #define OS_MBOX_ACCEPT_EN 1 /* Include code for OSMboxAccept() */ 00088 #define OS_MBOX_DEL_EN 1 /* Include code for OSMboxDel() */ 00089 #define OS_MBOX_PEND_ABORT_EN 1 /* Include code for OSMboxPendAbort() */ 00090 #define OS_MBOX_POST_EN 1 /* Include code for OSMboxPost() */ 00091 #define OS_MBOX_POST_OPT_EN 1 /* Include code for OSMboxPostOpt() */ 00092 #define OS_MBOX_QUERY_EN 1 /* Include code for OSMboxQuery() */ 00093 00094 00095 /* --------------------- MEMORY MANAGEMENT -------------------- */ 00096 #define OS_MEM_EN 0 /* Enable (1) or Disable (0) code generation for MEMORY MANAGER */ 00097 #define OS_MEM_NAME_SIZE 16 /* Determine the size of a memory partition name */ 00098 #define OS_MEM_QUERY_EN 1 /* Include code for OSMemQuery() */ 00099 00100 00101 /* ---------------- MUTUAL EXCLUSION SEMAPHORES --------------- */ 00102 #define OS_MUTEX_EN 0 /* Enable (1) or Disable (0) code generation for MUTEX */ 00103 #define OS_MUTEX_ACCEPT_EN 1 /* Include code for OSMutexAccept() */ 00104 #define OS_MUTEX_DEL_EN 1 /* Include code for OSMutexDel() */ 00105 #define OS_MUTEX_QUERY_EN 1 /* Include code for OSMutexQuery() */ 00106 00107 00108 /* ---------------------- MESSAGE QUEUES ---------------------- */ 00109 #define OS_Q_EN 0 /* Enable (1) or Disable (0) code generation for QUEUES */ 00110 #define OS_Q_ACCEPT_EN 1 /* Include code for OSQAccept() */ 00111 #define OS_Q_DEL_EN 1 /* Include code for OSQDel() */ 00112 #define OS_Q_FLUSH_EN 1 /* Include code for OSQFlush() */ 00113 #define OS_Q_PEND_ABORT_EN 1 /* Include code for OSQPendAbort() */ 00114 #define OS_Q_POST_EN 1 /* Include code for OSQPost() */ 00115 #define OS_Q_POST_FRONT_EN 1 /* Include code for OSQPostFront() */ 00116 #define OS_Q_POST_OPT_EN 1 /* Include code for OSQPostOpt() */ 00117 #define OS_Q_QUERY_EN 1 /* Include code for OSQQuery() */ 00118 00119 00120 /* ------------------------ SEMAPHORES ------------------------ */ 00121 #define OS_SEM_EN 1 /* Enable (1) or Disable (0) code generation for SEMAPHORES */ 00122 #define OS_SEM_ACCEPT_EN 1 /* Include code for OSSemAccept() */ 00123 #define OS_SEM_DEL_EN 1 /* Include code for OSSemDel() */ 00124 #define OS_SEM_PEND_ABORT_EN 1 /* Include code for OSSemPendAbort() */ 00125 #define OS_SEM_QUERY_EN 1 /* Include code for OSSemQuery() */ 00126 #define OS_SEM_SET_EN 1 /* Include code for OSSemSet() */ 00127 00128 00129 /* --------------------- TIME MANAGEMENT ---------------------- */ 00130 #define OS_TIME_DLY_HMSM_EN 1 /* Include code for OSTimeDlyHMSM() */ 00131 #define OS_TIME_DLY_RESUME_EN 1 /* Include code for OSTimeDlyResume() */ 00132 #define OS_TIME_GET_SET_EN 1 /* Include code for OSTimeGet() and OSTimeSet() */ 00133 #define OS_TIME_TICK_HOOK_EN 1 /* Include code for OSTimeTickHook() */ 00134 00135 00136 /* --------------------- TIMER MANAGEMENT --------------------- */ 00137 #define OS_TMR_EN 0 /* Enable (1) or Disable (0) code generation for TIMERS */ 00138 #define OS_TMR_CFG_MAX 16 /* Maximum number of timers */ 00139 #define OS_TMR_CFG_NAME_SIZE 16 /* Determine the size of a timer name */ 00140 #define OS_TMR_CFG_WHEEL_SIZE 8 /* Size of timer wheel (#Spokes) */ 00141 #define OS_TMR_CFG_TICKS_PER_SEC 10 /* Rate at which timer management task runs (Hz) */ 00142 00143 #endif