uc-sdk
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
mpu_wrappers.h
Go to the documentation of this file.
1 /*
2  FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd.
3  All rights reserved
4 
5  VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
6 
7  ***************************************************************************
8  * *
9  * FreeRTOS provides completely free yet professionally developed, *
10  * robust, strictly quality controlled, supported, and cross *
11  * platform software that has become a de facto standard. *
12  * *
13  * Help yourself get started quickly and support the FreeRTOS *
14  * project by purchasing a FreeRTOS tutorial book, reference *
15  * manual, or both from: http://www.FreeRTOS.org/Documentation *
16  * *
17  * Thank you! *
18  * *
19  ***************************************************************************
20 
21  This file is part of the FreeRTOS distribution.
22 
23  FreeRTOS is free software; you can redistribute it and/or modify it under
24  the terms of the GNU General Public License (version 2) as published by the
25  Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
26 
27  >>! NOTE: The modification to the GPL is included to allow you to distribute
28  >>! a combined work that includes FreeRTOS without being obliged to provide
29  >>! the source code for proprietary components outside of the FreeRTOS
30  >>! kernel.
31 
32  FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
33  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
34  FOR A PARTICULAR PURPOSE. Full license text is available from the following
35  link: http://www.freertos.org/a00114.html
36 
37  1 tab == 4 spaces!
38 
39  ***************************************************************************
40  * *
41  * Having a problem? Start by reading the FAQ "My application does *
42  * not run, what could be wrong?" *
43  * *
44  * http://www.FreeRTOS.org/FAQHelp.html *
45  * *
46  ***************************************************************************
47 
48  http://www.FreeRTOS.org - Documentation, books, training, latest versions,
49  license and Real Time Engineers Ltd. contact details.
50 
51  http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
52  including FreeRTOS+Trace - an indispensable productivity tool, a DOS
53  compatible FAT file system, and our tiny thread aware UDP/IP stack.
54 
55  http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
56  Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS
57  licenses offer ticketed support, indemnification and middleware.
58 
59  http://www.SafeRTOS.com - High Integrity Systems also provide a safety
60  engineered and independently SIL3 certified version for use in safety and
61  mission critical applications that require provable dependability.
62 
63  1 tab == 4 spaces!
64 */
65 
66 #ifndef MPU_WRAPPERS_H
67 #define MPU_WRAPPERS_H
68 
69 /* This file redefines API functions to be called through a wrapper macro, but
70 only for ports that are using the MPU. */
71 #ifdef portUSING_MPU_WRAPPERS
72 
73  /* MPU_WRAPPERS_INCLUDED_FROM_API_FILE will be defined when this file is
74  included from queue.c or task.c to prevent it from having an effect within
75  those files. */
76  #ifndef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
77 
78  #define xTaskGenericCreate MPU_xTaskGenericCreate
79  #define vTaskAllocateMPURegions MPU_vTaskAllocateMPURegions
80  #define vTaskDelete MPU_vTaskDelete
81  #define vTaskDelayUntil MPU_vTaskDelayUntil
82  #define vTaskDelay MPU_vTaskDelay
83  #define uxTaskPriorityGet MPU_uxTaskPriorityGet
84  #define vTaskPrioritySet MPU_vTaskPrioritySet
85  #define eTaskGetState MPU_eTaskGetState
86  #define vTaskSuspend MPU_vTaskSuspend
87  #define xTaskIsTaskSuspended MPU_xTaskIsTaskSuspended
88  #define vTaskResume MPU_vTaskResume
89  #define vTaskSuspendAll MPU_vTaskSuspendAll
90  #define xTaskResumeAll MPU_xTaskResumeAll
91  #define xTaskGetTickCount MPU_xTaskGetTickCount
92  #define uxTaskGetNumberOfTasks MPU_uxTaskGetNumberOfTasks
93  #define vTaskList MPU_vTaskList
94  #define vTaskGetRunTimeStats MPU_vTaskGetRunTimeStats
95  #define vTaskSetApplicationTaskTag MPU_vTaskSetApplicationTaskTag
96  #define xTaskGetApplicationTaskTag MPU_xTaskGetApplicationTaskTag
97  #define xTaskCallApplicationTaskHook MPU_xTaskCallApplicationTaskHook
98  #define uxTaskGetStackHighWaterMark MPU_uxTaskGetStackHighWaterMark
99  #define xTaskGetCurrentTaskHandle MPU_xTaskGetCurrentTaskHandle
100  #define xTaskGetSchedulerState MPU_xTaskGetSchedulerState
101  #define xTaskGetIdleTaskHandle MPU_xTaskGetIdleTaskHandle
102  #define uxTaskGetSystemState MPU_uxTaskGetSystemState
103 
104  #define xQueueGenericCreate MPU_xQueueGenericCreate
105  #define xQueueCreateMutex MPU_xQueueCreateMutex
106  #define xQueueGiveMutexRecursive MPU_xQueueGiveMutexRecursive
107  #define xQueueTakeMutexRecursive MPU_xQueueTakeMutexRecursive
108  #define xQueueCreateCountingSemaphore MPU_xQueueCreateCountingSemaphore
109  #define xQueueGenericSend MPU_xQueueGenericSend
110  #define xQueueAltGenericSend MPU_xQueueAltGenericSend
111  #define xQueueAltGenericReceive MPU_xQueueAltGenericReceive
112  #define xQueueGenericReceive MPU_xQueueGenericReceive
113  #define uxQueueMessagesWaiting MPU_uxQueueMessagesWaiting
114  #define vQueueDelete MPU_vQueueDelete
115  #define xQueueGenericReset MPU_xQueueGenericReset
116  #define xQueueCreateSet MPU_xQueueCreateSet
117  #define xQueueSelectFromSet MPU_xQueueSelectFromSet
118  #define xQueueAddToSet MPU_xQueueAddToSet
119  #define xQueueRemoveFromSet MPU_xQueueRemoveFromSet
120  #define xQueuePeekFromISR MPU_xQueuePeekFromISR
121 
122  #define pvPortMalloc MPU_pvPortMalloc
123  #define vPortFree MPU_vPortFree
124  #define xPortGetFreeHeapSize MPU_xPortGetFreeHeapSize
125  #define vPortInitialiseBlocks MPU_vPortInitialiseBlocks
126 
127  #if configQUEUE_REGISTRY_SIZE > 0
128  #define vQueueAddToRegistry MPU_vQueueAddToRegistry
129  #define vQueueUnregisterQueue MPU_vQueueUnregisterQueue
130  #endif
131 
132  /* Remove the privileged function macro. */
133  #define PRIVILEGED_FUNCTION
134 
135  #else /* MPU_WRAPPERS_INCLUDED_FROM_API_FILE */
136 
137  /* Ensure API functions go in the privileged execution section. */
138  #define PRIVILEGED_FUNCTION __attribute__((section("privileged_functions")))
139  #define PRIVILEGED_DATA __attribute__((section("privileged_data")))
140 
141  #endif /* MPU_WRAPPERS_INCLUDED_FROM_API_FILE */
142 
143 #else /* portUSING_MPU_WRAPPERS */
144 
145  #define PRIVILEGED_FUNCTION
146  #define PRIVILEGED_DATA
147  #define portUSING_MPU_WRAPPERS 0
148 
149 #endif /* portUSING_MPU_WRAPPERS */
150 
151 
152 #endif /* MPU_WRAPPERS_H */
153