Quick and dirty CoOS + LWIP ( Webserver )

Dependencies:   mbed lwip

Committer:
astroboy
Date:
Sat Sep 10 22:41:10 2011 +0000
Revision:
0:94897d537b31

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
astroboy 0:94897d537b31 1 /**
astroboy 0:94897d537b31 2 *******************************************************************************
astroboy 0:94897d537b31 3 * @file config.h
astroboy 0:94897d537b31 4 * @version V1.1.4
astroboy 0:94897d537b31 5 * @date 2011.04.20
astroboy 0:94897d537b31 6 * @brief This file use by user to configuration CooCox CoOS.
astroboy 0:94897d537b31 7 * @note Ensure you have knew every item before modify this file.
astroboy 0:94897d537b31 8 *******************************************************************************
astroboy 0:94897d537b31 9 * @copy
astroboy 0:94897d537b31 10 *
astroboy 0:94897d537b31 11 * INTERNAL FILE,DON'T PUBLIC.
astroboy 0:94897d537b31 12 *
astroboy 0:94897d537b31 13 * <h2><center>&copy; COPYRIGHT 2009 CooCox </center></h2>
astroboy 0:94897d537b31 14 *******************************************************************************
astroboy 0:94897d537b31 15 */
astroboy 0:94897d537b31 16
astroboy 0:94897d537b31 17
astroboy 0:94897d537b31 18 #ifndef _CONFIG_H
astroboy 0:94897d537b31 19 #define _CONFIG_H
astroboy 0:94897d537b31 20
astroboy 0:94897d537b31 21
astroboy 0:94897d537b31 22 /*!<
astroboy 0:94897d537b31 23 Defines chip type,cortex-m3(1),cortex-m0(2)
astroboy 0:94897d537b31 24 */
astroboy 0:94897d537b31 25 #define CFG_CHIP_TYPE (1)
astroboy 0:94897d537b31 26
astroboy 0:94897d537b31 27 /*!<
astroboy 0:94897d537b31 28 Defines the lowest priority that be assigned.
astroboy 0:94897d537b31 29 */
astroboy 0:94897d537b31 30 #define CFG_LOWEST_PRIO (64)
astroboy 0:94897d537b31 31
astroboy 0:94897d537b31 32 /*!<
astroboy 0:94897d537b31 33 Max number of tasks that can be running.
astroboy 0:94897d537b31 34 */
astroboy 0:94897d537b31 35 #define CFG_MAX_USER_TASKS (5)
astroboy 0:94897d537b31 36
astroboy 0:94897d537b31 37 /*!<
astroboy 0:94897d537b31 38 Idle task stack size(word).
astroboy 0:94897d537b31 39 */
astroboy 0:94897d537b31 40 #define CFG_IDLE_STACK_SIZE (25)
astroboy 0:94897d537b31 41
astroboy 0:94897d537b31 42 /*!<
astroboy 0:94897d537b31 43 System frequency (Hz).
astroboy 0:94897d537b31 44 */
astroboy 0:94897d537b31 45 #define CFG_CPU_FREQ (96000000)
astroboy 0:94897d537b31 46
astroboy 0:94897d537b31 47 /*!<
astroboy 0:94897d537b31 48 systick frequency (Hz).
astroboy 0:94897d537b31 49 */
astroboy 0:94897d537b31 50 #define CFG_SYSTICK_FREQ (1000)
astroboy 0:94897d537b31 51
astroboy 0:94897d537b31 52 /*!<
astroboy 0:94897d537b31 53 max systerm api call num in ISR.
astroboy 0:94897d537b31 54 */
astroboy 0:94897d537b31 55 #define CFG_MAX_SERVICE_REQUEST (3)
astroboy 0:94897d537b31 56
astroboy 0:94897d537b31 57 /*!<
astroboy 0:94897d537b31 58 Enable(1) or disable(0) order list schedule.
astroboy 0:94897d537b31 59 If disable(0),CoOS use Binary-Scheduling Algorithm.
astroboy 0:94897d537b31 60 */
astroboy 0:94897d537b31 61 #if (CFG_MAX_USER_TASKS) <15
astroboy 0:94897d537b31 62 #define CFG_ORDER_LIST_SCHEDULE_EN (1)
astroboy 0:94897d537b31 63 #else
astroboy 0:94897d537b31 64 #define CFG_ORDER_LIST_SCHEDULE_EN (0)
astroboy 0:94897d537b31 65 #endif
astroboy 0:94897d537b31 66
astroboy 0:94897d537b31 67
astroboy 0:94897d537b31 68 /*!<
astroboy 0:94897d537b31 69 Enable(1) or disable(0) Round-Robin Task switching.
astroboy 0:94897d537b31 70 */
astroboy 0:94897d537b31 71 #define CFG_ROBIN_EN (0)
astroboy 0:94897d537b31 72
astroboy 0:94897d537b31 73 /*!<
astroboy 0:94897d537b31 74 Default slice of task.
astroboy 0:94897d537b31 75 */
astroboy 0:94897d537b31 76 #if CFG_ROBIN_EN > 0
astroboy 0:94897d537b31 77 #define CFG_TIME_SLICE (10)
astroboy 0:94897d537b31 78 #endif
astroboy 0:94897d537b31 79
astroboy 0:94897d537b31 80
astroboy 0:94897d537b31 81 /*----------------------- Schedule model Config -----------------------------*/
astroboy 0:94897d537b31 82 /*!<
astroboy 0:94897d537b31 83 Enable(1) or disable(0) all waiting function.
astroboy 0:94897d537b31 84 Include sem,mailbox,queue,flag,mutex,delay modules.
astroboy 0:94897d537b31 85 If CFG_TASK_WAITTING_EN=0,all these modules are disable.
astroboy 0:94897d537b31 86 */
astroboy 0:94897d537b31 87 #define CFG_TASK_WAITTING_EN (1)
astroboy 0:94897d537b31 88
astroboy 0:94897d537b31 89 /*!<
astroboy 0:94897d537b31 90 Dynamic task scheduling(1) or Static Task Scheduling(0) model.
astroboy 0:94897d537b31 91 If in Static Task Scheduling model(0),cannot creat task and change task priority
astroboy 0:94897d537b31 92 after coocox os start running. In Dynamic Task Scheduling model(1), all these can.
astroboy 0:94897d537b31 93 When task terminated, if in Static Task Scheduling model(0),
astroboy 0:94897d537b31 94 CoOS do not recovered task resources, and you can activate it again.
astroboy 0:94897d537b31 95 But in Dynamic Task Scheduling model(1),task resources will be recovered.
astroboy 0:94897d537b31 96 If in Static Task Scheduling model(0),mutex module can not be used, as this model don't
astroboy 0:94897d537b31 97 support to change task priority while CoOS running.
astroboy 0:94897d537b31 98 */
astroboy 0:94897d537b31 99 #define CFG_TASK_SCHEDULE_EN (1)
astroboy 0:94897d537b31 100
astroboy 0:94897d537b31 101
astroboy 0:94897d537b31 102 /*---------------------- Task Management Config -----------------------------*/
astroboy 0:94897d537b31 103 /*!<
astroboy 0:94897d537b31 104 Enable(1) or disable(0) CoSetPriority() API.
astroboy 0:94897d537b31 105 */
astroboy 0:94897d537b31 106 #if CFG_TASK_SCHEDULE_EN >0
astroboy 0:94897d537b31 107 #define CFG_PRIORITY_SET_EN (0)
astroboy 0:94897d537b31 108 #endif
astroboy 0:94897d537b31 109
astroboy 0:94897d537b31 110 /*!<
astroboy 0:94897d537b31 111 Enable(1) or disable(0) CoAwakeTask() and CoSuspendTask() API.
astroboy 0:94897d537b31 112 */
astroboy 0:94897d537b31 113 #define CFG_TASK_SUSPEND_EN (0)
astroboy 0:94897d537b31 114
astroboy 0:94897d537b31 115
astroboy 0:94897d537b31 116 /*---------------------- Debug Management Config ----------------------------*/
astroboy 0:94897d537b31 117 /*!<
astroboy 0:94897d537b31 118 Enable(1) or disable(0) parameter checkout .
astroboy 0:94897d537b31 119 */
astroboy 0:94897d537b31 120 #define CFG_PAR_CHECKOUT_EN (0)
astroboy 0:94897d537b31 121
astroboy 0:94897d537b31 122 /*!<
astroboy 0:94897d537b31 123 Enable(1) or disable(0) stack overflow checkout .
astroboy 0:94897d537b31 124 */
astroboy 0:94897d537b31 125 #define CFG_STK_CHECKOUT_EN (0)
astroboy 0:94897d537b31 126
astroboy 0:94897d537b31 127
astroboy 0:94897d537b31 128
astroboy 0:94897d537b31 129 /*---------------------- Memory Management Config ----------------------------*/
astroboy 0:94897d537b31 130 /*!<
astroboy 0:94897d537b31 131 Enable(1) or disable(0) memory management.
astroboy 0:94897d537b31 132 */
astroboy 0:94897d537b31 133 #define CFG_MM_EN (0)
astroboy 0:94897d537b31 134
astroboy 0:94897d537b31 135 /*!<
astroboy 0:94897d537b31 136 Max number of memory.(must be less than 32).
astroboy 0:94897d537b31 137 */
astroboy 0:94897d537b31 138 #if CFG_MM_EN >0
astroboy 0:94897d537b31 139 #define CFG_MAX_MM (2)
astroboy 0:94897d537b31 140 #endif
astroboy 0:94897d537b31 141
astroboy 0:94897d537b31 142
astroboy 0:94897d537b31 143
astroboy 0:94897d537b31 144 /*-------------------- Kernel heap Management Config -------------------------*/
astroboy 0:94897d537b31 145 /*!<
astroboy 0:94897d537b31 146 Enable(1) or disable(0) kernel heap management.
astroboy 0:94897d537b31 147 */
astroboy 0:94897d537b31 148 #define CFG_KHEAP_EN (0)
astroboy 0:94897d537b31 149
astroboy 0:94897d537b31 150 /*!<
astroboy 0:94897d537b31 151 Kernel heap size(word).
astroboy 0:94897d537b31 152 */
astroboy 0:94897d537b31 153 #if CFG_KHEAP_EN >0
astroboy 0:94897d537b31 154 #define KHEAP_SIZE (50)
astroboy 0:94897d537b31 155 #endif
astroboy 0:94897d537b31 156
astroboy 0:94897d537b31 157
astroboy 0:94897d537b31 158
astroboy 0:94897d537b31 159 /*---------------------- Time Management Config -----------------------------*/
astroboy 0:94897d537b31 160 /*!<
astroboy 0:94897d537b31 161 Enable(1) or disable(0) TimeDelay() API.
astroboy 0:94897d537b31 162 */
astroboy 0:94897d537b31 163 #if CFG_TASK_WAITTING_EN >0
astroboy 0:94897d537b31 164 #define CFG_TIME_DELAY_EN (1)
astroboy 0:94897d537b31 165 #endif
astroboy 0:94897d537b31 166
astroboy 0:94897d537b31 167
astroboy 0:94897d537b31 168 /*---------------------- Timer Management Config ----------------------------*/
astroboy 0:94897d537b31 169 /*!<
astroboy 0:94897d537b31 170 Enable(1) or disable(0) timer management.
astroboy 0:94897d537b31 171 */
astroboy 0:94897d537b31 172 #define CFG_TMR_EN (0)
astroboy 0:94897d537b31 173
astroboy 0:94897d537b31 174 /*!<
astroboy 0:94897d537b31 175 Specify max number timer.(must be less than 32)
astroboy 0:94897d537b31 176 */
astroboy 0:94897d537b31 177 #if CFG_TMR_EN >0
astroboy 0:94897d537b31 178 #define CFG_MAX_TMR (2)
astroboy 0:94897d537b31 179 #endif
astroboy 0:94897d537b31 180
astroboy 0:94897d537b31 181
astroboy 0:94897d537b31 182 /*---------------------- Event Management Config ----------------------------*/
astroboy 0:94897d537b31 183 /*!<
astroboy 0:94897d537b31 184 Enable(1) or disable(0) events management,
astroboy 0:94897d537b31 185 events including semaphore,mailbox,queue.
astroboy 0:94897d537b31 186 */
astroboy 0:94897d537b31 187 #if CFG_TASK_WAITTING_EN > 0
astroboy 0:94897d537b31 188 #define CFG_EVENT_EN (1)
astroboy 0:94897d537b31 189 #endif
astroboy 0:94897d537b31 190
astroboy 0:94897d537b31 191 #if CFG_EVENT_EN > 0
astroboy 0:94897d537b31 192 /*!<
astroboy 0:94897d537b31 193 Event sort type.(1)FIFO (2)PRI (3)FIFO+PRI
astroboy 0:94897d537b31 194 */
astroboy 0:94897d537b31 195 #define CFG_EVENT_SORT (3)
astroboy 0:94897d537b31 196
astroboy 0:94897d537b31 197 /*!<
astroboy 0:94897d537b31 198 Max number of event.(must be less than 255)
astroboy 0:94897d537b31 199 Event = semaphore + mailbox + queue;
astroboy 0:94897d537b31 200 */
astroboy 0:94897d537b31 201 #define CFG_MAX_EVENT (5)
astroboy 0:94897d537b31 202
astroboy 0:94897d537b31 203 /*!<
astroboy 0:94897d537b31 204 Enable(1) or disable(0) semaphore management.
astroboy 0:94897d537b31 205 */
astroboy 0:94897d537b31 206 #define CFG_SEM_EN (1)
astroboy 0:94897d537b31 207
astroboy 0:94897d537b31 208 /*!<
astroboy 0:94897d537b31 209 Enable(1) or disable(0) mailbox management.
astroboy 0:94897d537b31 210 */
astroboy 0:94897d537b31 211 #define CFG_MAILBOX_EN (1)
astroboy 0:94897d537b31 212
astroboy 0:94897d537b31 213 /*!<
astroboy 0:94897d537b31 214 Enable(1) or disable(0) queue management.
astroboy 0:94897d537b31 215 */
astroboy 0:94897d537b31 216 #define CFG_QUEUE_EN (0)
astroboy 0:94897d537b31 217
astroboy 0:94897d537b31 218 /*!<
astroboy 0:94897d537b31 219 Max number of queue.(less than CFG_MAX_EVENT).
astroboy 0:94897d537b31 220 */
astroboy 0:94897d537b31 221 #if CFG_QUEUE_EN >0
astroboy 0:94897d537b31 222 #define CFG_MAX_QUEUE (2)
astroboy 0:94897d537b31 223 #endif // CFG_QUEUE_EN
astroboy 0:94897d537b31 224
astroboy 0:94897d537b31 225 #endif // CFG_EVENT_EN
astroboy 0:94897d537b31 226
astroboy 0:94897d537b31 227
astroboy 0:94897d537b31 228
astroboy 0:94897d537b31 229 /*----------------------- Flag Management Config ----------------------------*/
astroboy 0:94897d537b31 230 /*!<
astroboy 0:94897d537b31 231 Enable(1) or disable(0) flag management.
astroboy 0:94897d537b31 232 Max number of flag is 32.
astroboy 0:94897d537b31 233 */
astroboy 0:94897d537b31 234 #if CFG_TASK_WAITTING_EN > 0
astroboy 0:94897d537b31 235 #define CFG_FLAG_EN (1)
astroboy 0:94897d537b31 236 #endif
astroboy 0:94897d537b31 237
astroboy 0:94897d537b31 238
astroboy 0:94897d537b31 239 /*---------------------- Mutex Management Config ----------------------------*/
astroboy 0:94897d537b31 240 /*!<
astroboy 0:94897d537b31 241 Enable(1) or disable(0) mutex management.
astroboy 0:94897d537b31 242 */
astroboy 0:94897d537b31 243 #if CFG_TASK_WAITTING_EN > 0
astroboy 0:94897d537b31 244 #if CFG_TASK_SCHEDULE_EN > 0
astroboy 0:94897d537b31 245 #define CFG_MUTEX_EN (1)
astroboy 0:94897d537b31 246 #endif
astroboy 0:94897d537b31 247 #endif
astroboy 0:94897d537b31 248
astroboy 0:94897d537b31 249
astroboy 0:94897d537b31 250 /*!<
astroboy 0:94897d537b31 251 Max number of mutex.(must be less than 255).
astroboy 0:94897d537b31 252 */
astroboy 0:94897d537b31 253 #if CFG_MUTEX_EN >0
astroboy 0:94897d537b31 254 #define CFG_MAX_MUTEX (10)
astroboy 0:94897d537b31 255 #endif
astroboy 0:94897d537b31 256
astroboy 0:94897d537b31 257 /*---------------------- Utility Management Config --------------------------*/
astroboy 0:94897d537b31 258 /*!<
astroboy 0:94897d537b31 259 Enable(1) or disable(0) utility management.
astroboy 0:94897d537b31 260 */
astroboy 0:94897d537b31 261 #define CFG_UTILITY_EN (0)
astroboy 0:94897d537b31 262
astroboy 0:94897d537b31 263 #if CFG_UTILITY_EN >0
astroboy 0:94897d537b31 264
astroboy 0:94897d537b31 265 /*!<
astroboy 0:94897d537b31 266 Enable(1) or disable(0) TickToTime() utility
astroboy 0:94897d537b31 267 */
astroboy 0:94897d537b31 268 #define CFG_TICK_TO_TIME_EN (1)
astroboy 0:94897d537b31 269 /*!<
astroboy 0:94897d537b31 270 Enable(1) or disable(0) TimeToTick() utility
astroboy 0:94897d537b31 271 */
astroboy 0:94897d537b31 272 #define CFG_TIME_TO_TICK_EN (1)
astroboy 0:94897d537b31 273 #endif
astroboy 0:94897d537b31 274
astroboy 0:94897d537b31 275
astroboy 0:94897d537b31 276 #endif // _CONFIG_H