00001 /* 00002 * Femto OS v 0.91 - Copyright (C) 2008-2009 Ruud Vlaming 00003 * 00004 * This file is part of the Femto OS distribution. 00005 * 00006 * This program is free software: you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation, version 3 of the License. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 * 00018 * Please note that, due to the GPLv3 license, for application of this 00019 * work and/or combined work in embedded systems special obligations apply. 00020 * If these are not to you liking, please know the Femto OS is dual 00021 * licensed. A commercial license and support are available. 00022 * See http://www.femtoos.org/ for details. 00023 */ 00024 00025 #ifndef FEMTOOS_SHARED_H 00026 #define FEMTOOS_SHARED_H 00027 00028 #include "femtoos_types.h" 00029 00030 00031 /* This file contains the variables and declarations shared between the implementation 00032 * files of the different part of the Femto OS. It should not be included in application 00033 * code. 00034 */ 00035 00036 extern Ttickcount uxTickCount; 00037 extern Tuint08 uiOsStatus; 00038 extern TosData xOS; 00039 extern Tuint08 uiFsStatus; 00040 00041 extern Tuint08 uiOsTimeAverage; 00042 extern Tuint16 uiOsLoadCollect; 00043 extern Tuint16 uiOsLoadTotal; 00044 extern Tuint16 uiIdleLoadCollect; 00045 extern Tuint16 uiIdleLoadTotal; 00046 extern Tuint08 uiIsrLoadTemp; 00047 extern Tuint16 uiIsrLoadCollect; 00048 extern Tuint16 uiIsrLoadTotal; 00049 extern Tuint08 uiLastOsStatus; 00050 extern Tuint08 uiOsStackMax; 00051 00052 #if ((StackSizeISR) > 0xFF) 00053 extern Tuint16 uiIsrStackMax; 00054 #else 00055 extern Tuint08 uiIsrStackMax; 00056 #endif 00057 00058 extern Tchar StackISR[(StackSizeISR)]; 00059 extern Tchar StackSHR[(StackSizeShared)]; 00060 00061 00062 extern void appTick00(void); 00063 extern void appTick08(void); 00064 extern void appTick16(void); 00065 extern void appTickSleep(void); 00066 extern void appEnterIdle(void); 00067 extern void appEnterSleep(void); 00068 extern void appExitSleep(void); 00069 extern void appBoot(void); 00070 00071 00072 extern const Tbyte * pxTCBlist[defNumberOfTasks]; 00073 extern const TtaskDefinitionBlock * pxTDBlist[defNumberOfTasks]; 00074 extern const fpInitTask pxInitlist[defNumberOfTasks]; 00075 extern const fpLoopTask pxLooplist[defNumberOfTasks]; 00076 extern const fpBarkTask pxBarklist[defNumberOfWatchdogTasks]; 00077 extern const Tbyte * pxQueulist[defNumberOfQueus]; 00078 extern const Tuint08 uiQueuSize[defNumberOfQueus]; 00079 extern const Tuint08 uiFileSpace[defFsNumberOfPreFiles]; 00080 extern const Tuint08 uiCapabilities[defNumberOfTasks]; 00081 00082 extern Tuint08 uiQueuWrite[defNumberOfQueus]; 00083 extern Tuint08 uiQueuRead[defNumberOfQueus]; 00084 00085 00086 /* Below we define a couple of pseudo variabled only meant to 00087 * provide the post processor with information about the 00088 * organization of the system. They cannot be called or used.*/ 00089 extern const Tbyte defInfoCouplingTask(TN_00)[0]; 00090 extern const Tbyte defInfoCouplingTask(TN_01)[1]; 00091 extern const Tbyte defInfoCouplingTask(TN_02)[2]; 00092 extern const Tbyte defInfoCouplingTask(TN_03)[3]; 00093 extern const Tbyte defInfoCouplingTask(TN_04)[4]; 00094 extern const Tbyte defInfoCouplingTask(TN_05)[5]; 00095 extern const Tbyte defInfoCouplingTask(TN_06)[6]; 00096 extern const Tbyte defInfoCouplingTask(TN_07)[7]; 00097 extern const Tbyte defInfoCouplingTask(TN_08)[8]; 00098 extern const Tbyte defInfoCouplingTask(TN_09)[9]; 00099 extern const Tbyte defInfoCouplingTask(TN_10)[10]; 00100 extern const Tbyte defInfoCouplingTask(TN_11)[11]; 00101 extern const Tbyte defInfoCouplingTask(TN_12)[12]; 00102 extern const Tbyte defInfoCouplingTask(TN_13)[13]; 00103 extern const Tbyte defInfoCouplingTask(TN_14)[14]; 00104 extern const Tbyte defInfoCouplingTask(TN_15)[15]; 00105 00106 extern const Tbyte defInfoCouplingSlot(LN_01)[1]; 00107 extern const Tbyte defInfoCouplingSlot(LN_02)[2]; 00108 extern const Tbyte defInfoCouplingSlot(LN_03)[3]; 00109 extern const Tbyte defInfoCouplingSlot(LN_04)[4]; 00110 extern const Tbyte defInfoCouplingSlot(LN_05)[5]; 00111 extern const Tbyte defInfoCouplingSlot(LN_06)[6]; 00112 extern const Tbyte defInfoCouplingSlot(LN_07)[7]; 00113 extern const Tbyte defInfoCouplingSlot(LN_08)[8]; 00114 extern const Tbyte defInfoCouplingSlot(LN_09)[9]; 00115 extern const Tbyte defInfoCouplingSlot(LN_10)[10]; 00116 extern const Tbyte defInfoCouplingSlot(LN_11)[11]; 00117 extern const Tbyte defInfoCouplingSlot(LN_12)[12]; 00118 extern const Tbyte defInfoCouplingSlot(LN_13)[13]; 00119 extern const Tbyte defInfoCouplingSlot(LN_14)[14]; 00120 extern const Tbyte defInfoCouplingSlot(LN_15)[15]; 00121 00122 extern const Tbyte defInfoCouplingFile(VN_00)[0]; 00123 extern const Tbyte defInfoCouplingFile(VN_01)[1]; 00124 extern const Tbyte defInfoCouplingFile(VN_02)[2]; 00125 extern const Tbyte defInfoCouplingFile(VN_03)[3]; 00126 extern const Tbyte defInfoCouplingFile(VN_04)[4]; 00127 extern const Tbyte defInfoCouplingFile(VN_05)[5]; 00128 extern const Tbyte defInfoCouplingFile(VN_06)[6]; 00129 extern const Tbyte defInfoCouplingFile(VN_07)[7]; 00130 extern const Tbyte defInfoCouplingFile(VN_08)[8]; 00131 extern const Tbyte defInfoCouplingFile(VN_09)[9]; 00132 extern const Tbyte defInfoCouplingFile(VN_10)[10]; 00133 extern const Tbyte defInfoCouplingFile(VN_11)[11]; 00134 extern const Tbyte defInfoCouplingFile(VN_12)[12]; 00135 extern const Tbyte defInfoCouplingFile(VN_13)[13]; 00136 extern const Tbyte defInfoCouplingFile(VN_14)[14]; 00137 extern const Tbyte defInfoCouplingFile(VN_15)[15]; 00138 00139 00140 #endif /* FEMTOOS_SHARED_H */