Daniel Peter
/
RtosTest
scmRTOS_config.h@0:331db0b44b67, 2010-09-21 (annotated)
- Committer:
- mbed714
- Date:
- Tue Sep 21 19:48:05 2010 +0000
- Revision:
- 0:331db0b44b67
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed714 | 0:331db0b44b67 | 1 | //****************************************************************************** |
mbed714 | 0:331db0b44b67 | 2 | //* |
mbed714 | 0:331db0b44b67 | 3 | //* FULLNAME: Single-Chip Microcontroller Real-Time Operating System |
mbed714 | 0:331db0b44b67 | 4 | //* |
mbed714 | 0:331db0b44b67 | 5 | //* NICKNAME: scmRTOS |
mbed714 | 0:331db0b44b67 | 6 | //* |
mbed714 | 0:331db0b44b67 | 7 | //* PROCESSOR: ARM Cortex-M3 |
mbed714 | 0:331db0b44b67 | 8 | //* |
mbed714 | 0:331db0b44b67 | 9 | //* TOOLKIT: EWARM (IAR Systems) |
mbed714 | 0:331db0b44b67 | 10 | //* |
mbed714 | 0:331db0b44b67 | 11 | //* PURPOSE: Project Level Configuration |
mbed714 | 0:331db0b44b67 | 12 | //* |
mbed714 | 0:331db0b44b67 | 13 | //* Version: 3.10 |
mbed714 | 0:331db0b44b67 | 14 | //* |
mbed714 | 0:331db0b44b67 | 15 | //* $Revision: 196 $ |
mbed714 | 0:331db0b44b67 | 16 | //* $Date:: 2008-06-19 #$ |
mbed714 | 0:331db0b44b67 | 17 | //* |
mbed714 | 0:331db0b44b67 | 18 | //* Copyright (c) 2003-2010, Harry E. Zhurov |
mbed714 | 0:331db0b44b67 | 19 | //* |
mbed714 | 0:331db0b44b67 | 20 | //* Permission is hereby granted, free of charge, to any person |
mbed714 | 0:331db0b44b67 | 21 | //* obtaining a copy of this software and associated documentation |
mbed714 | 0:331db0b44b67 | 22 | //* files (the "Software"), to deal in the Software without restriction, |
mbed714 | 0:331db0b44b67 | 23 | //* including without limitation the rights to use, copy, modify, merge, |
mbed714 | 0:331db0b44b67 | 24 | //* publish, distribute, sublicense, and/or sell copies of the Software, |
mbed714 | 0:331db0b44b67 | 25 | //* and to permit persons to whom the Software is furnished to do so, |
mbed714 | 0:331db0b44b67 | 26 | //* subject to the following conditions: |
mbed714 | 0:331db0b44b67 | 27 | //* |
mbed714 | 0:331db0b44b67 | 28 | //* The above copyright notice and this permission notice shall be included |
mbed714 | 0:331db0b44b67 | 29 | //* in all copies or substantial portions of the Software. |
mbed714 | 0:331db0b44b67 | 30 | //* |
mbed714 | 0:331db0b44b67 | 31 | //* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
mbed714 | 0:331db0b44b67 | 32 | //* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
mbed714 | 0:331db0b44b67 | 33 | //* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
mbed714 | 0:331db0b44b67 | 34 | //* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
mbed714 | 0:331db0b44b67 | 35 | //* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
mbed714 | 0:331db0b44b67 | 36 | //* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH |
mbed714 | 0:331db0b44b67 | 37 | //* THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
mbed714 | 0:331db0b44b67 | 38 | //* |
mbed714 | 0:331db0b44b67 | 39 | //* ================================================================= |
mbed714 | 0:331db0b44b67 | 40 | //* See http://scmrtos.sourceforge.net for documentation, latest |
mbed714 | 0:331db0b44b67 | 41 | //* information, license and contact details. |
mbed714 | 0:331db0b44b67 | 42 | //* ================================================================= |
mbed714 | 0:331db0b44b67 | 43 | //* |
mbed714 | 0:331db0b44b67 | 44 | //****************************************************************************** |
mbed714 | 0:331db0b44b67 | 45 | //* Ported by Andrey Chuikin, Copyright (c) 2008-2010 |
mbed714 | 0:331db0b44b67 | 46 | |
mbed714 | 0:331db0b44b67 | 47 | #ifndef scmRTOS_CONFIG_H |
mbed714 | 0:331db0b44b67 | 48 | #define scmRTOS_CONFIG_H |
mbed714 | 0:331db0b44b67 | 49 | |
mbed714 | 0:331db0b44b67 | 50 | #ifndef __IAR_SYSTEMS_ASM__ |
mbed714 | 0:331db0b44b67 | 51 | #include <commdefs.h> |
mbed714 | 0:331db0b44b67 | 52 | |
mbed714 | 0:331db0b44b67 | 53 | typedef word TTimeout; |
mbed714 | 0:331db0b44b67 | 54 | |
mbed714 | 0:331db0b44b67 | 55 | #endif // __IAR_SYSTEMS_ASM__ |
mbed714 | 0:331db0b44b67 | 56 | |
mbed714 | 0:331db0b44b67 | 57 | #include "device.h" |
mbed714 | 0:331db0b44b67 | 58 | //------------------------------------------------------------------------------ |
mbed714 | 0:331db0b44b67 | 59 | // |
mbed714 | 0:331db0b44b67 | 60 | // Specify scmRTOS Process Count. Must be less than 31 |
mbed714 | 0:331db0b44b67 | 61 | // |
mbed714 | 0:331db0b44b67 | 62 | // |
mbed714 | 0:331db0b44b67 | 63 | #define scmRTOS_PROCESS_COUNT 2 |
mbed714 | 0:331db0b44b67 | 64 | |
mbed714 | 0:331db0b44b67 | 65 | //----------------------------------------------------------------------------- |
mbed714 | 0:331db0b44b67 | 66 | // |
mbed714 | 0:331db0b44b67 | 67 | // scmRTOS System Timer |
mbed714 | 0:331db0b44b67 | 68 | // |
mbed714 | 0:331db0b44b67 | 69 | // Nested Interrupts enable macro. Value 1 means that interrupts are |
mbed714 | 0:331db0b44b67 | 70 | // globally enabled within System Timer ISR (this is default for Cortex-M3). |
mbed714 | 0:331db0b44b67 | 71 | // |
mbed714 | 0:331db0b44b67 | 72 | // |
mbed714 | 0:331db0b44b67 | 73 | #define scmRTOS_SYSTIMER_NEST_INTS_ENABLE 1 |
mbed714 | 0:331db0b44b67 | 74 | |
mbed714 | 0:331db0b44b67 | 75 | //----------------------------------------------------------------------------- |
mbed714 | 0:331db0b44b67 | 76 | // |
mbed714 | 0:331db0b44b67 | 77 | // scmRTOS System Timer Tick Counter Enable |
mbed714 | 0:331db0b44b67 | 78 | // |
mbed714 | 0:331db0b44b67 | 79 | // |
mbed714 | 0:331db0b44b67 | 80 | #define scmRTOS_SYSTEM_TICKS_ENABLE 1 |
mbed714 | 0:331db0b44b67 | 81 | |
mbed714 | 0:331db0b44b67 | 82 | |
mbed714 | 0:331db0b44b67 | 83 | //----------------------------------------------------------------------------- |
mbed714 | 0:331db0b44b67 | 84 | // |
mbed714 | 0:331db0b44b67 | 85 | // scmRTOS System Timer Hook |
mbed714 | 0:331db0b44b67 | 86 | // |
mbed714 | 0:331db0b44b67 | 87 | // |
mbed714 | 0:331db0b44b67 | 88 | #define scmRTOS_SYSTIMER_HOOK_ENABLE 1 |
mbed714 | 0:331db0b44b67 | 89 | |
mbed714 | 0:331db0b44b67 | 90 | //----------------------------------------------------------------------------- |
mbed714 | 0:331db0b44b67 | 91 | // |
mbed714 | 0:331db0b44b67 | 92 | // scmRTOS Idle Process Hook |
mbed714 | 0:331db0b44b67 | 93 | // |
mbed714 | 0:331db0b44b67 | 94 | // |
mbed714 | 0:331db0b44b67 | 95 | #define scmRTOS_IDLE_HOOK_ENABLE 1 |
mbed714 | 0:331db0b44b67 | 96 | |
mbed714 | 0:331db0b44b67 | 97 | //----------------------------------------------------------------------------- |
mbed714 | 0:331db0b44b67 | 98 | // |
mbed714 | 0:331db0b44b67 | 99 | // scmRTOS Idle Process Stack size (in bytes) |
mbed714 | 0:331db0b44b67 | 100 | // (20 * sizeof(TStackItem)) - it's a minimum allowed value. |
mbed714 | 0:331db0b44b67 | 101 | // |
mbed714 | 0:331db0b44b67 | 102 | #define scmRTOS_IDLE_PROCESS_STACK_SIZE (20 * sizeof(TStackItem)) |
mbed714 | 0:331db0b44b67 | 103 | |
mbed714 | 0:331db0b44b67 | 104 | //----------------------------------------------------------------------------- |
mbed714 | 0:331db0b44b67 | 105 | // |
mbed714 | 0:331db0b44b67 | 106 | // scmRTOS Priority Order |
mbed714 | 0:331db0b44b67 | 107 | // |
mbed714 | 0:331db0b44b67 | 108 | // This macro defines the order of the process's priorities. Default, |
mbed714 | 0:331db0b44b67 | 109 | // the ascending order is used. Alternatively, the descending priority |
mbed714 | 0:331db0b44b67 | 110 | // order can be used. On some platforms the descending order is preferred |
mbed714 | 0:331db0b44b67 | 111 | // because of performance. |
mbed714 | 0:331db0b44b67 | 112 | // |
mbed714 | 0:331db0b44b67 | 113 | // Default (corresponding to ascending order) value of macro is 0. |
mbed714 | 0:331db0b44b67 | 114 | // Alternative (corresponding to descending order) value of macro is 1. |
mbed714 | 0:331db0b44b67 | 115 | // |
mbed714 | 0:331db0b44b67 | 116 | // On Cortex-M3 the descending order is preferred for performance reason. |
mbed714 | 0:331db0b44b67 | 117 | // |
mbed714 | 0:331db0b44b67 | 118 | #define scmRTOS_PRIORITY_ORDER 1 |
mbed714 | 0:331db0b44b67 | 119 | |
mbed714 | 0:331db0b44b67 | 120 | //----------------------------------------------------------------------------- |
mbed714 | 0:331db0b44b67 | 121 | // |
mbed714 | 0:331db0b44b67 | 122 | // scmRTOS Context Switch User Hook enable |
mbed714 | 0:331db0b44b67 | 123 | // |
mbed714 | 0:331db0b44b67 | 124 | // The macro enables/disables user defined hook called from system |
mbed714 | 0:331db0b44b67 | 125 | // Context Switch Hook function. |
mbed714 | 0:331db0b44b67 | 126 | // |
mbed714 | 0:331db0b44b67 | 127 | // |
mbed714 | 0:331db0b44b67 | 128 | #define scmRTOS_CONTEXT_SWITCH_USER_HOOK_ENABLE 0 |
mbed714 | 0:331db0b44b67 | 129 | |
mbed714 | 0:331db0b44b67 | 130 | |
mbed714 | 0:331db0b44b67 | 131 | #endif // scmRTOS_CONFIG_H |
mbed714 | 0:331db0b44b67 | 132 | //----------------------------------------------------------------------------- |
mbed714 | 0:331db0b44b67 | 133 |