]> git.sur5r.net Git - freertos/blob - FreeRTOS/Source/include/mpu_prototypes.h
Update TaskNotify.c to test the condition where a direct to task notification is...
[freertos] / FreeRTOS / Source / include / mpu_prototypes.h
1 /*\r
2     FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.\r
3     All rights reserved\r
4 \r
5     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
6 \r
7     This file is part of the FreeRTOS distribution.\r
8 \r
9     FreeRTOS is free software; you can redistribute it and/or modify it under\r
10     the terms of the GNU General Public License (version 2) as published by the\r
11     Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.\r
12 \r
13     ***************************************************************************\r
14     >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
15     >>!   distribute a combined work that includes FreeRTOS without being   !<<\r
16     >>!   obliged to provide the source code for proprietary components     !<<\r
17     >>!   outside of the FreeRTOS kernel.                                   !<<\r
18     ***************************************************************************\r
19 \r
20     FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
21     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
22     FOR A PARTICULAR PURPOSE.  Full license text is available on the following\r
23     link: http://www.freertos.org/a00114.html\r
24 \r
25     ***************************************************************************\r
26      *                                                                       *\r
27      *    FreeRTOS provides completely free yet professionally developed,    *\r
28      *    robust, strictly quality controlled, supported, and cross          *\r
29      *    platform software that is more than just the market leader, it     *\r
30      *    is the industry's de facto standard.                               *\r
31      *                                                                       *\r
32      *    Help yourself get started quickly while simultaneously helping     *\r
33      *    to support the FreeRTOS project by purchasing a FreeRTOS           *\r
34      *    tutorial book, reference manual, or both:                          *\r
35      *    http://www.FreeRTOS.org/Documentation                              *\r
36      *                                                                       *\r
37     ***************************************************************************\r
38 \r
39     http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading\r
40     the FAQ page "My application does not run, what could be wrong?".  Have you\r
41     defined configASSERT()?\r
42 \r
43     http://www.FreeRTOS.org/support - In return for receiving this top quality\r
44     embedded software for free we request you assist our global community by\r
45     participating in the support forum.\r
46 \r
47     http://www.FreeRTOS.org/training - Investing in training allows your team to\r
48     be as productive as possible as early as possible.  Now you can receive\r
49     FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers\r
50     Ltd, and the world's leading authority on the world's leading RTOS.\r
51 \r
52     http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
53     including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
54     compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
55 \r
56     http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.\r
57     Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.\r
58 \r
59     http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High\r
60     Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
61     licenses offer ticketed support, indemnification and commercial middleware.\r
62 \r
63     http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
64     engineered and independently SIL3 certified version for use in safety and\r
65     mission critical applications that require provable dependability.\r
66 \r
67     1 tab == 4 spaces!\r
68 */\r
69 \r
70 /*\r
71  * When the MPU is used the standard (non MPU) API functions are mapped to\r
72  * equivalents that start "MPU_", the prototypes for which are defined in this\r
73  * header files.  This will cause the application code to call the MPU_ version\r
74  * which wraps the non-MPU version with privilege promoting then demoting code,\r
75  * so the kernel code always runs will full privileges.\r
76  */\r
77 \r
78 \r
79 #ifndef MPU_PROTOTYPES_H\r
80 #define MPU_PROTOTYPES_H\r
81 \r
82 /* MPU versions of tasks.h API function. */\r
83 BaseType_t MPU_xTaskCreate( TaskFunction_t pxTaskCode, const char * const pcName, const uint16_t usStackDepth, void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pxCreatedTask );\r
84 TaskHandle_t MPU_xTaskCreateStatic( TaskFunction_t pxTaskCode, const char * const pcName, const uint32_t ulStackDepth, void * const pvParameters, UBaseType_t uxPriority, StackType_t * const puxStackBuffer, StaticTask_t * const pxTaskBuffer );\r
85 BaseType_t MPU_xTaskCreateRestricted( const TaskParameters_t * const pxTaskDefinition, TaskHandle_t *pxCreatedTask );\r
86 BaseType_t MPU_xTaskCreateRestrictedStatic( const TaskParameters_t * const pxTaskDefinition, TaskHandle_t *pxCreatedTask );\r
87 void MPU_vTaskAllocateMPURegions( TaskHandle_t xTask, const MemoryRegion_t * const pxRegions );\r
88 void MPU_vTaskDelete( TaskHandle_t xTaskToDelete );\r
89 void MPU_vTaskDelay( const TickType_t xTicksToDelay );\r
90 void MPU_vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement );\r
91 BaseType_t MPU_xTaskAbortDelay( TaskHandle_t xTask );\r
92 UBaseType_t MPU_uxTaskPriorityGet( TaskHandle_t xTask );\r
93 eTaskState MPU_eTaskGetState( TaskHandle_t xTask );\r
94 void MPU_vTaskGetInfo( TaskHandle_t xTask, TaskStatus_t *pxTaskStatus, BaseType_t xGetFreeStackSpace, eTaskState eState );\r
95 void MPU_vTaskPrioritySet( TaskHandle_t xTask, UBaseType_t uxNewPriority );\r
96 void MPU_vTaskSuspend( TaskHandle_t xTaskToSuspend );\r
97 void MPU_vTaskResume( TaskHandle_t xTaskToResume );\r
98 void MPU_vTaskStartScheduler( void );\r
99 void MPU_vTaskSuspendAll( void );\r
100 BaseType_t MPU_xTaskResumeAll( void );\r
101 TickType_t MPU_xTaskGetTickCount( void );\r
102 UBaseType_t MPU_uxTaskGetNumberOfTasks( void );\r
103 char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery );\r
104 TaskHandle_t MPU_xTaskGetHandle( const char *pcNameToQuery );\r
105 UBaseType_t MPU_uxTaskGetStackHighWaterMark( TaskHandle_t xTask );\r
106 void MPU_vTaskSetApplicationTaskTag( TaskHandle_t xTask, TaskHookFunction_t pxHookFunction );\r
107 TaskHookFunction_t MPU_xTaskGetApplicationTaskTag( TaskHandle_t xTask );\r
108 void MPU_vTaskSetThreadLocalStoragePointer( TaskHandle_t xTaskToSet, BaseType_t xIndex, void *pvValue );\r
109 void * MPU_pvTaskGetThreadLocalStoragePointer( TaskHandle_t xTaskToQuery, BaseType_t xIndex );\r
110 BaseType_t MPU_xTaskCallApplicationTaskHook( TaskHandle_t xTask, void *pvParameter );\r
111 TaskHandle_t MPU_xTaskGetIdleTaskHandle( void );\r
112 UBaseType_t MPU_uxTaskGetSystemState( TaskStatus_t * const pxTaskStatusArray, const UBaseType_t uxArraySize, uint32_t * const pulTotalRunTime );\r
113 void MPU_vTaskList( char * pcWriteBuffer );\r
114 void MPU_vTaskGetRunTimeStats( char *pcWriteBuffer );\r
115 BaseType_t MPU_xTaskGenericNotify( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue );\r
116 BaseType_t MPU_xTaskNotifyWait( uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t *pulNotificationValue, TickType_t xTicksToWait );\r
117 uint32_t MPU_ulTaskNotifyTake( BaseType_t xClearCountOnExit, TickType_t xTicksToWait );\r
118 BaseType_t MPU_xTaskNotifyStateClear( TaskHandle_t xTask );\r
119 BaseType_t MPU_xTaskIncrementTick( void );\r
120 TaskHandle_t MPU_xTaskGetCurrentTaskHandle( void );\r
121 void MPU_vTaskSetTimeOutState( TimeOut_t * const pxTimeOut );\r
122 BaseType_t MPU_xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, TickType_t * const pxTicksToWait );\r
123 void MPU_vTaskMissedYield( void );\r
124 BaseType_t MPU_xTaskGetSchedulerState( void );\r
125 \r
126 /* MPU versions of queue.h API function. */\r
127 BaseType_t MPU_xQueueGenericSend( QueueHandle_t xQueue, const void * const pvItemToQueue, TickType_t xTicksToWait, const BaseType_t xCopyPosition );\r
128 BaseType_t MPU_xQueueReceive( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait );\r
129 BaseType_t xQueuePeek( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait );\r
130 BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue, TickType_t xTicksToWait );\r
131 UBaseType_t MPU_uxQueueMessagesWaiting( const QueueHandle_t xQueue );\r
132 UBaseType_t MPU_uxQueueSpacesAvailable( const QueueHandle_t xQueue );\r
133 void MPU_vQueueDelete( QueueHandle_t xQueue );\r
134 QueueHandle_t MPU_xQueueCreateMutex( const uint8_t ucQueueType );\r
135 QueueHandle_t MPU_xQueueCreateMutexStatic( const uint8_t ucQueueType, StaticQueue_t *pxStaticQueue );\r
136 QueueHandle_t MPU_xQueueCreateCountingSemaphore( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount );\r
137 QueueHandle_t MPU_xQueueCreateCountingSemaphoreStatic( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount, StaticQueue_t *pxStaticQueue );\r
138 void* MPU_xQueueGetMutexHolder( QueueHandle_t xSemaphore );\r
139 BaseType_t MPU_xQueueTakeMutexRecursive( QueueHandle_t xMutex, TickType_t xTicksToWait );\r
140 BaseType_t MPU_xQueueGiveMutexRecursive( QueueHandle_t pxMutex );\r
141 void MPU_vQueueAddToRegistry( QueueHandle_t xQueue, const char *pcName );\r
142 void MPU_vQueueUnregisterQueue( QueueHandle_t xQueue );\r
143 const char * MPU_pcQueueGetName( QueueHandle_t xQueue );\r
144 QueueHandle_t MPU_xQueueGenericCreate( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, const uint8_t ucQueueType );\r
145 QueueHandle_t MPU_xQueueGenericCreateStatic( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, uint8_t *pucQueueStorage, StaticQueue_t *pxStaticQueue, const uint8_t ucQueueType );\r
146 QueueSetHandle_t MPU_xQueueCreateSet( const UBaseType_t uxEventQueueLength );\r
147 BaseType_t MPU_xQueueAddToSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet );\r
148 BaseType_t MPU_xQueueRemoveFromSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet );\r
149 QueueSetMemberHandle_t MPU_xQueueSelectFromSet( QueueSetHandle_t xQueueSet, const TickType_t xTicksToWait );\r
150 BaseType_t MPU_xQueueGenericReset( QueueHandle_t xQueue, BaseType_t xNewQueue );\r
151 void MPU_vQueueSetQueueNumber( QueueHandle_t xQueue, UBaseType_t uxQueueNumber );\r
152 UBaseType_t MPU_uxQueueGetQueueNumber( QueueHandle_t xQueue );\r
153 uint8_t MPU_ucQueueGetQueueType( QueueHandle_t xQueue );\r
154 \r
155 /* MPU versions of timers.h API function. */\r
156 TimerHandle_t MPU_xTimerCreate( const char * const pcTimerName, const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, TimerCallbackFunction_t pxCallbackFunction );\r
157 TimerHandle_t MPU_xTimerCreateStatic(   const char * const pcTimerName, const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, TimerCallbackFunction_t pxCallbackFunction, StaticTimer_t *pxTimerBuffer );\r
158 void * MPU_pvTimerGetTimerID( const TimerHandle_t xTimer );\r
159 void MPU_vTimerSetTimerID( TimerHandle_t xTimer, void *pvNewID );\r
160 BaseType_t MPU_xTimerIsTimerActive( TimerHandle_t xTimer );\r
161 TaskHandle_t MPU_xTimerGetTimerDaemonTaskHandle( void );\r
162 BaseType_t MPU_xTimerPendFunctionCall( PendedFunction_t xFunctionToPend, void *pvParameter1, uint32_t ulParameter2, TickType_t xTicksToWait );\r
163 const char * MPU_pcTimerGetName( TimerHandle_t xTimer );\r
164 TickType_t MPU_xTimerGetPeriod( TimerHandle_t xTimer );\r
165 TickType_t MPU_xTimerGetExpiryTime( TimerHandle_t xTimer );\r
166 BaseType_t MPU_xTimerCreateTimerTask( void );\r
167 BaseType_t MPU_xTimerGenericCommand( TimerHandle_t xTimer, const BaseType_t xCommandID, const TickType_t xOptionalValue, BaseType_t * const pxHigherPriorityTaskWoken, const TickType_t xTicksToWait );\r
168 \r
169 /* MPU versions of event_group.h API function. */\r
170 EventGroupHandle_t MPU_xEventGroupCreate( void );\r
171 EventGroupHandle_t MPU_xEventGroupCreateStatic( StaticEventGroup_t *pxEventGroupBuffer );\r
172 EventBits_t MPU_xEventGroupWaitBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToWaitFor, const BaseType_t xClearOnExit, const BaseType_t xWaitForAllBits, TickType_t xTicksToWait );\r
173 EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToClear );\r
174 EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet );\r
175 EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet, const EventBits_t uxBitsToWaitFor, TickType_t xTicksToWait );\r
176 void MPU_vEventGroupDelete( EventGroupHandle_t xEventGroup );\r
177 UBaseType_t MPU_uxEventGroupGetNumber( void* xEventGroup );\r
178 \r
179 #endif /* MPU_PROTOTYPES_H */\r
180 \r