]> git.sur5r.net Git - freertos/blob - Source/include/portable.h
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@43 1d2547de-c912-0410-9cb9...
[freertos] / Source / include / portable.h
1 /*\r
2         FreeRTOS.org V4.1.2 - Copyright (C) 2003-2006 Richard Barry.\r
3 \r
4         This file is part of the FreeRTOS.org distribution.\r
5 \r
6         FreeRTOS.org is free software; you can redistribute it and/or modify\r
7         it under the terms of the GNU General Public License as published by\r
8         the Free Software Foundation; either version 2 of the License, or\r
9         (at your option) any later version.\r
10 \r
11         FreeRTOS.org is distributed in the hope that it will be useful,\r
12         but WITHOUT ANY WARRANTY; without even the implied warranty of\r
13         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
14         GNU General Public License for more details.\r
15 \r
16         You should have received a copy of the GNU General Public License\r
17         along with FreeRTOS.org; if not, write to the Free Software\r
18         Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
19 \r
20         A special exception to the GPL can be applied should you wish to distribute\r
21         a combined work that includes FreeRTOS.org, without being obliged to provide\r
22         the source code for any proprietary components.  See the licensing section\r
23         of http:www.FreeRTOS.org for full details of how and when the exception\r
24         can be applied.\r
25 \r
26         ***************************************************************************\r
27         See http:www.FreeRTOS.org for documentation, latest information, license\r
28         and contact details.  Please ensure to read the configuration and relevant\r
29         port sections of the online documentation.\r
30         ***************************************************************************\r
31 */\r
32 \r
33 /*-----------------------------------------------------------\r
34  * Portable layer API.  Each function must be defined for each port.\r
35  *----------------------------------------------------------*/\r
36 \r
37 #ifndef PORTABLE_H\r
38 #define PORTABLE_H\r
39 \r
40 /* Include the macro file relevant to the port being used. */\r
41 \r
42 #ifdef OPEN_WATCOM_INDUSTRIAL_PC_PORT\r
43         #include "..\..\source\portable\owatcom\16bitdos\pc\portmacro.h"\r
44         typedef void ( __interrupt __far *pxISR )();\r
45 #endif\r
46 \r
47 #ifdef OPEN_WATCOM_FLASH_LITE_186_PORT\r
48         #include "..\..\source\portable\owatcom\16bitdos\flsh186\portmacro.h"\r
49         typedef void ( __interrupt __far *pxISR )();\r
50 #endif\r
51 \r
52 #ifdef GCC_MEGA_AVR\r
53         #include "../portable/GCC/ATMega323/portmacro.h"\r
54 #endif\r
55 \r
56 #ifdef IAR_MEGA_AVR\r
57         #include "../portable/IAR/ATMega323/portmacro.h"\r
58 #endif\r
59 \r
60 #ifdef MPLAB_PIC24_PORT\r
61         #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"\r
62 #endif\r
63 \r
64 #ifdef MPLAB_DSPIC_PORT\r
65         #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"\r
66 #endif\r
67 \r
68 #ifdef MPLAB_PIC18F_PORT\r
69         #include "..\..\source\portable\MPLAB\PIC18F\portmacro.h"\r
70 #endif\r
71 \r
72 #ifdef _FEDPICC\r
73         #include "libFreeRTOS/Include/portmacro.h"\r
74 #endif\r
75 \r
76 #ifdef SDCC_CYGNAL\r
77         #include "../../Source/portable/SDCC/Cygnal/portmacro.h"\r
78 #endif\r
79 \r
80 #ifdef GCC_ARM7\r
81         #include "../../Source/portable/GCC/ARM7_LPC2000/portmacro.h"\r
82 #endif\r
83 \r
84 #ifdef GCC_MSP430\r
85         #include "../../Source/portable/GCC/MSP430F449/portmacro.h"\r
86 #endif\r
87 \r
88 #ifdef ROWLEY_MSP430\r
89         #include "../../Source/portable/Rowley/MSP430F449/portmacro.h"\r
90 #endif\r
91 \r
92 #ifdef KEIL_ARM7\r
93         #include "..\..\Source\portable\Keil\ARM7\portmacro.h"\r
94 #endif\r
95 \r
96 #ifdef SAM7_GCC\r
97         #include "../../Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h"\r
98 #endif\r
99 \r
100 #ifdef SAM7_IAR\r
101         #include "..\..\Source\portable\IAR\AtmelSAM7S64\portmacro.h"\r
102 #endif\r
103 \r
104 #ifdef LPC2000_IAR\r
105         #include "..\..\Source\portable\IAR\LPC2000\portmacro.h"\r
106 #endif\r
107 \r
108 #ifdef STR71X_IAR\r
109         #include "..\..\Source\portable\IAR\STR71x\portmacro.h"\r
110 #endif\r
111 \r
112 #ifdef STR75X_IAR\r
113         #include "..\..\Source\portable\IAR\STR75x\portmacro.h"\r
114 #endif\r
115         \r
116 #ifdef STR91X_IAR\r
117         #include "..\..\Source\portable\IAR\STR91x\portmacro.h"\r
118 #endif\r
119         \r
120 #ifdef GCC_H8S\r
121         #include "../../Source/portable/GCC/H8S2329/portmacro.h"\r
122 #endif\r
123 \r
124 #ifdef GCC_AT91FR40008\r
125         #include "../../Source/portable/GCC/ARM7_AT91FR40008/portmacro.h"\r
126 #endif\r
127 \r
128 #ifdef RVDS_ARMCM3_LM3S102\r
129         #include "../../Source/portable/RVDS/ARM_CM3/portmacro.h"\r
130 #endif\r
131 \r
132 #ifdef GCC_ARMCM3_LM3S102\r
133         #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"\r
134 #endif\r
135 \r
136 #ifdef IAR_ARMCM3_LM\r
137         #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"\r
138 #endif\r
139         \r
140 #ifdef HCS12_CODE_WARRIOR\r
141         #include "../../Source/portable/CodeWarrior/HCS12/portmacro.h"\r
142 #endif  \r
143 \r
144 #ifdef MICROBLAZE_GCC\r
145         #include "../../Source/portable/GCC/MicroBlaze/portmacro.h"\r
146 #endif\r
147 \r
148 #ifdef TERN_EE\r
149         #include "..\..\Source\portable\Paradigm\Tern_EE\small\portmacro.h"\r
150 #endif\r
151 \r
152 #ifdef GCC_HCS12\r
153         #include "../../Source/portable/GCC/HCS12/portmacro.h"\r
154 #endif\r
155 \r
156 #ifdef GCC_MCF5235\r
157     #include "../../Source/portable/GCC/MCF5235/portmacro.h"\r
158 #endif\r
159 \r
160 #ifdef BCC_INDUSTRIAL_PC_PORT\r
161         /* A short file name has to be used in place of the normal\r
162         FreeRTOSConfig.h when using the Borland compiler. */\r
163         #include "frconfig.h"\r
164         #include "..\portable\BCC\16BitDOS\PC\prtmacro.h"\r
165     typedef void ( __interrupt __far *pxISR )();\r
166 #endif\r
167 \r
168 #ifdef BCC_FLASH_LITE_186_PORT\r
169         /* A short file name has to be used in place of the normal\r
170         FreeRTOSConfig.h when using the Borland compiler. */\r
171         #include "frconfig.h"\r
172         #include "..\portable\BCC\16BitDOS\flsh186\prtmacro.h"\r
173     typedef void ( __interrupt __far *pxISR )();\r
174 #endif\r
175 /*\r
176  * Setup the stack of a new task so it is ready to be placed under the\r
177  * scheduler control.  The registers have to be placed on the stack in\r
178  * the order that the port expects to find them.\r
179  */\r
180 portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters );\r
181 \r
182 /*\r
183  * Map to the memory management routines required for the port.\r
184  */\r
185 void *pvPortMalloc( size_t xSize );\r
186 void vPortFree( void *pv );\r
187 void vPortInitialiseBlocks( void );\r
188 \r
189 /*\r
190  * Setup the hardware ready for the scheduler to take control.  This generally\r
191  * sets up a tick interrupt and sets timers for the correct tick frequency.\r
192  */\r
193 portBASE_TYPE xPortStartScheduler( void );\r
194 \r
195 /*\r
196  * Undo any hardware/ISR setup that was performed by xPortStartScheduler() so\r
197  * the hardware is left in its original condition after the scheduler stops\r
198  * executing.\r
199  */\r
200 void vPortEndScheduler( void );\r
201 \r
202 \r
203 #endif /* PORTABLE_H */\r
204 \r