mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-01 08:54:14 -04:00
Update the MPU port so it supports all the public functions found in V9.0.0rc2.
This commit is contained in:
parent
da6c95edae
commit
ac67c39be9
14 changed files with 1044 additions and 369 deletions
|
@ -80,6 +80,9 @@ task.h is included from an application file. */
|
|||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "queue.h"
|
||||
#include "timers.h"
|
||||
#include "event_groups.h"
|
||||
#include "mpu_prototypes.h"
|
||||
|
||||
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
|
||||
|
||||
|
@ -175,56 +178,6 @@ static void prvRestoreContextOfFirstTask( void ) __attribute__(( naked )) PRIVIL
|
|||
*/
|
||||
static void prvSVCHandler( uint32_t *pulRegisters ) __attribute__(( noinline )) PRIVILEGED_FUNCTION;
|
||||
|
||||
/*
|
||||
* Prototypes for all the MPU wrappers.
|
||||
*/
|
||||
BaseType_t MPU_xTaskCreateRestricted( const TaskParameters_t * const pxTaskDefinition, TaskHandle_t *pxCreatedTask );
|
||||
BaseType_t MPU_xTaskCreate( TaskFunction_t pvTaskCode, const char * const pcName, uint16_t usStackDepth, void *pvParameters, UBaseType_t uxPriority, TaskHandle_t *pxCreatedTask );
|
||||
void MPU_vTaskAllocateMPURegions( TaskHandle_t xTask, const MemoryRegion_t * const xRegions );
|
||||
void MPU_vTaskDelete( TaskHandle_t pxTaskToDelete );
|
||||
void MPU_vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, TickType_t xTimeIncrement );
|
||||
void MPU_vTaskDelay( TickType_t xTicksToDelay );
|
||||
UBaseType_t MPU_uxTaskPriorityGet( TaskHandle_t pxTask );
|
||||
void MPU_vTaskPrioritySet( TaskHandle_t pxTask, UBaseType_t uxNewPriority );
|
||||
eTaskState MPU_eTaskGetState( TaskHandle_t pxTask );
|
||||
void MPU_vTaskSuspend( TaskHandle_t pxTaskToSuspend );
|
||||
void MPU_vTaskResume( TaskHandle_t pxTaskToResume );
|
||||
void MPU_vTaskSuspendAll( void );
|
||||
BaseType_t MPU_xTaskResumeAll( void );
|
||||
TickType_t MPU_xTaskGetTickCount( void );
|
||||
UBaseType_t MPU_uxTaskGetNumberOfTasks( void );
|
||||
void MPU_vTaskList( char *pcWriteBuffer );
|
||||
void MPU_vTaskGetRunTimeStats( char *pcWriteBuffer );
|
||||
void MPU_vTaskSetApplicationTaskTag( TaskHandle_t xTask, TaskHookFunction_t pxTagValue );
|
||||
TaskHookFunction_t MPU_xTaskGetApplicationTaskTag( TaskHandle_t xTask );
|
||||
BaseType_t MPU_xTaskCallApplicationTaskHook( TaskHandle_t xTask, void *pvParameter );
|
||||
UBaseType_t MPU_uxTaskGetStackHighWaterMark( TaskHandle_t xTask );
|
||||
TaskHandle_t MPU_xTaskGetCurrentTaskHandle( void );
|
||||
BaseType_t MPU_xTaskGetSchedulerState( void );
|
||||
TaskHandle_t MPU_xTaskGetIdleTaskHandle( void );
|
||||
UBaseType_t MPU_uxTaskGetSystemState( TaskStatus_t *pxTaskStatusArray, UBaseType_t uxArraySize, uint32_t *pulTotalRunTime );
|
||||
QueueHandle_t MPU_xQueueGenericCreate( UBaseType_t uxQueueLength, UBaseType_t uxItemSize, uint8_t ucQueueType );
|
||||
BaseType_t MPU_xQueueGenericSend( QueueHandle_t xQueue, const void * const pvItemToQueue, TickType_t xTicksToWait, BaseType_t xCopyPosition );
|
||||
BaseType_t MPU_xQueueGenericReset( QueueHandle_t pxQueue, BaseType_t xNewQueue );
|
||||
UBaseType_t MPU_uxQueueMessagesWaiting( const QueueHandle_t pxQueue );
|
||||
BaseType_t MPU_xQueueGenericReceive( QueueHandle_t pxQueue, void * const pvBuffer, TickType_t xTicksToWait, BaseType_t xJustPeeking );
|
||||
QueueHandle_t MPU_xQueueCreateMutex( void );
|
||||
QueueHandle_t MPU_xQueueCreateCountingSemaphore( UBaseType_t uxCountValue, UBaseType_t uxInitialCount );
|
||||
BaseType_t MPU_xQueueTakeMutexRecursive( QueueHandle_t xMutex, TickType_t xBlockTime );
|
||||
BaseType_t MPU_xQueueGiveMutexRecursive( QueueHandle_t xMutex );
|
||||
void MPU_vQueueAddToRegistry( QueueHandle_t xQueue, char *pcName );
|
||||
void MPU_vQueueDelete( QueueHandle_t xQueue );
|
||||
void *MPU_pvPortMalloc( size_t xSize );
|
||||
void MPU_vPortFree( void *pv );
|
||||
void MPU_vPortInitialiseBlocks( void );
|
||||
size_t MPU_xPortGetFreeHeapSize( void );
|
||||
QueueSetHandle_t MPU_xQueueCreateSet( UBaseType_t uxEventQueueLength );
|
||||
QueueSetMemberHandle_t MPU_xQueueSelectFromSet( QueueSetHandle_t xQueueSet, TickType_t xBlockTimeTicks );
|
||||
BaseType_t MPU_xQueueAddToSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet );
|
||||
BaseType_t MPU_xQueueRemoveFromSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet );
|
||||
BaseType_t MPU_xQueuePeekFromISR( QueueHandle_t xQueue, void * const pvBuffer );
|
||||
void* MPU_xQueueGetMutexHolder( QueueHandle_t xSemaphore );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
|
@ -491,7 +444,7 @@ extern uint32_t __privileged_data_end__[];
|
|||
if( *portMPU_TYPE == portEXPECTED_MPU_TYPE_VALUE )
|
||||
{
|
||||
/* First setup the entire flash for unprivileged read only access. */
|
||||
*portMPU_REGION_BASE_ADDRESS = ( ( uint32_t ) __FLASH_segment_start__ ) | /* Base address. */
|
||||
*portMPU_REGION_BASE_ADDRESS = ( ( uint32_t ) __FLASH_segment_start__ ) | /* Base address. */
|
||||
( portMPU_REGION_VALID ) |
|
||||
( portUNPRIVILEGED_FLASH_REGION );
|
||||
|
||||
|
@ -503,7 +456,7 @@ extern uint32_t __privileged_data_end__[];
|
|||
/* Setup the first 16K for privileged only access (even though less
|
||||
than 10K is actually being used). This is where the kernel code is
|
||||
placed. */
|
||||
*portMPU_REGION_BASE_ADDRESS = ( ( uint32_t ) __FLASH_segment_start__ ) | /* Base address. */
|
||||
*portMPU_REGION_BASE_ADDRESS = ( ( uint32_t ) __FLASH_segment_start__ ) | /* Base address. */
|
||||
( portMPU_REGION_VALID ) |
|
||||
( portPRIVILEGED_FLASH_REGION );
|
||||
|
||||
|
@ -596,7 +549,7 @@ uint32_t ul;
|
|||
if( xRegions == NULL )
|
||||
{
|
||||
/* No MPU regions are specified so allow access to all RAM. */
|
||||
xMPUSettings->xRegion[ 0 ].ulRegionBaseAddress =
|
||||
xMPUSettings->xRegion[ 0 ].ulRegionBaseAddress =
|
||||
( ( uint32_t ) __SRAM_segment_start__ ) | /* Base address. */
|
||||
( portMPU_REGION_VALID ) |
|
||||
( portSTACK_REGION );
|
||||
|
@ -691,15 +644,30 @@ BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
BaseType_t MPU_xTaskCreate( TaskFunction_t pvTaskCode, const char * const pcName, uint16_t usStackDepth, void *pvParameters, UBaseType_t uxPriority, TaskHandle_t *pxCreatedTask )
|
||||
{
|
||||
BaseType_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
|
||||
BaseType_t MPU_xTaskCreate( TaskFunction_t pvTaskCode, const char * const pcName, uint16_t usStackDepth, void *pvParameters, UBaseType_t uxPriority, TaskHandle_t *pxCreatedTask )
|
||||
{
|
||||
BaseType_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xTaskCreate( pvTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pxCreatedTask );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return xReturn;
|
||||
}
|
||||
xReturn = xTaskCreate( pvTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pxCreatedTask );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return xReturn;
|
||||
}
|
||||
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
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 )
|
||||
{
|
||||
TaskHandle_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xTaskCreateStatic( pxTaskCode, pcName, ulStackDepth, pvParameters, uxPriority, puxStackBuffer, pxTaskBuffer );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return xReturn;
|
||||
}
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void MPU_vTaskAllocateMPURegions( TaskHandle_t xTask, const MemoryRegion_t * const xRegions )
|
||||
|
@ -714,10 +682,10 @@ BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
|||
#if ( INCLUDE_vTaskDelete == 1 )
|
||||
void MPU_vTaskDelete( TaskHandle_t pxTaskToDelete )
|
||||
{
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
vTaskDelete( pxTaskToDelete );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -725,10 +693,23 @@ BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
|||
#if ( INCLUDE_vTaskDelayUntil == 1 )
|
||||
void MPU_vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, TickType_t xTimeIncrement )
|
||||
{
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
vTaskDelayUntil( pxPreviousWakeTime, xTimeIncrement );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if ( INCLUDE_xTaskAbortDelay == 1 )
|
||||
BaseType_t MPU_xTaskAbortDelay( TaskHandle_t xTask )
|
||||
{
|
||||
BaseType_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xTaskAbortDelay( xTask );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return xReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -736,10 +717,10 @@ BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
|||
#if ( INCLUDE_vTaskDelay == 1 )
|
||||
void MPU_vTaskDelay( TickType_t xTicksToDelay )
|
||||
{
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
vTaskDelay( xTicksToDelay );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -748,10 +729,10 @@ BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
|||
UBaseType_t MPU_uxTaskPriorityGet( TaskHandle_t pxTask )
|
||||
{
|
||||
UBaseType_t uxReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
uxReturn = uxTaskPriorityGet( pxTask );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return uxReturn;
|
||||
}
|
||||
#endif
|
||||
|
@ -760,10 +741,10 @@ BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
|||
#if ( INCLUDE_vTaskPrioritySet == 1 )
|
||||
void MPU_vTaskPrioritySet( TaskHandle_t pxTask, UBaseType_t uxNewPriority )
|
||||
{
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
vTaskPrioritySet( pxTask, uxNewPriority );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -771,24 +752,35 @@ BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
|||
#if ( INCLUDE_eTaskGetState == 1 )
|
||||
eTaskState MPU_eTaskGetState( TaskHandle_t pxTask )
|
||||
{
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
eTaskState eReturn;
|
||||
|
||||
eReturn = eTaskGetState( pxTask );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return eReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( configUSE_TRACE_FACILITY == 1 )
|
||||
void MPU_vTaskGetInfo( TaskHandle_t xTask, TaskStatus_t *pxTaskStatus, BaseType_t xGetFreeStackSpace, eTaskState eState )
|
||||
{
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
vTaskGetInfo( xTask, pxTaskStatus, xGetFreeStackSpace, eState );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if ( INCLUDE_xTaskGetIdleTaskHandle == 1 )
|
||||
TaskHandle_t MPU_xTaskGetIdleTaskHandle( void )
|
||||
{
|
||||
TaskHandle_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xTaskGetIdleTaskHandle();
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return eReturn;
|
||||
}
|
||||
#endif
|
||||
|
@ -797,10 +789,10 @@ BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
|||
#if ( INCLUDE_vTaskSuspend == 1 )
|
||||
void MPU_vTaskSuspend( TaskHandle_t pxTaskToSuspend )
|
||||
{
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
vTaskSuspend( pxTaskToSuspend );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -808,10 +800,10 @@ BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
|||
#if ( INCLUDE_vTaskSuspend == 1 )
|
||||
void MPU_vTaskResume( TaskHandle_t pxTaskToResume )
|
||||
{
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
vTaskResume( pxTaskToResume );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -821,7 +813,7 @@ void MPU_vTaskSuspendAll( void )
|
|||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
vTaskSuspendAll();
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -831,8 +823,8 @@ BaseType_t xReturn;
|
|||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xTaskResumeAll();
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return xReturn;
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -842,7 +834,7 @@ TickType_t xReturn;
|
|||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xTaskGetTickCount();
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -853,11 +845,35 @@ UBaseType_t uxReturn;
|
|||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
uxReturn = uxTaskGetNumberOfTasks();
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return uxReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery )
|
||||
{
|
||||
char *pcReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
pcReturn = pcTaskGetName( xTaskToQuery );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return pcReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if ( INCLUDE_xTaskGetHandle == 1 )
|
||||
TaskHandle_t MPU_xTaskGetHandle( const char *pcNameToQuery )
|
||||
{
|
||||
TaskHandle_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xTaskGetHandle( pcNameToQuery );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return pcReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if ( configUSE_TRACE_FACILITY == 1 )
|
||||
void MPU_vTaskList( char *pcWriteBuffer )
|
||||
{
|
||||
|
@ -872,10 +888,10 @@ BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
|||
#if ( configGENERATE_RUN_TIME_STATS == 1 )
|
||||
void MPU_vTaskGetRunTimeStats( char *pcWriteBuffer )
|
||||
{
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
vTaskGetRunTimeStats( pcWriteBuffer );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -883,10 +899,10 @@ BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
|||
#if ( configUSE_APPLICATION_TASK_TAG == 1 )
|
||||
void MPU_vTaskSetApplicationTaskTag( TaskHandle_t xTask, TaskHookFunction_t pxTagValue )
|
||||
{
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
vTaskSetApplicationTaskTag( xTask, pxTagValue );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -895,23 +911,47 @@ BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
|||
TaskHookFunction_t MPU_xTaskGetApplicationTaskTag( TaskHandle_t xTask )
|
||||
{
|
||||
TaskHookFunction_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xTaskGetApplicationTaskTag( xTask );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return xReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS != 0 )
|
||||
void MPU_vTaskSetThreadLocalStoragePointer( TaskHandle_t xTaskToSet, BaseType_t xIndex, void *pvValue )
|
||||
{
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
vTaskSetThreadLocalStoragePointer( xTaskToSet, xIndex, pvValue );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS != 0 )
|
||||
void *MPU_pvTaskGetThreadLocalStoragePointer( TaskHandle_t xTaskToQuery, BaseType_t xIndex )
|
||||
{
|
||||
void *pvReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
pvReturn = pvTaskGetThreadLocalStoragePointer( xTaskToQuery, xIndex );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return pvReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if ( configUSE_APPLICATION_TASK_TAG == 1 )
|
||||
BaseType_t MPU_xTaskCallApplicationTaskHook( TaskHandle_t xTask, void *pvParameter )
|
||||
{
|
||||
BaseType_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xTaskCallApplicationTaskHook( xTask, pvParameter );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return xReturn;
|
||||
}
|
||||
#endif
|
||||
|
@ -934,10 +974,10 @@ BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
|||
UBaseType_t MPU_uxTaskGetStackHighWaterMark( TaskHandle_t xTask )
|
||||
{
|
||||
UBaseType_t uxReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
uxReturn = uxTaskGetStackHighWaterMark( xTask );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return uxReturn;
|
||||
}
|
||||
#endif
|
||||
|
@ -947,10 +987,10 @@ BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
|||
TaskHandle_t MPU_xTaskGetCurrentTaskHandle( void )
|
||||
{
|
||||
TaskHandle_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xTaskGetCurrentTaskHandle();
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return xReturn;
|
||||
}
|
||||
#endif
|
||||
|
@ -960,26 +1000,100 @@ BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
|||
BaseType_t MPU_xTaskGetSchedulerState( void )
|
||||
{
|
||||
BaseType_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xTaskGetSchedulerState();
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return xReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
QueueHandle_t MPU_xQueueGenericCreate( UBaseType_t uxQueueLength, UBaseType_t uxItemSize, uint8_t ucQueueType )
|
||||
void MPU_vTaskSetTimeOutState( TimeOut_t * const pxTimeOut )
|
||||
{
|
||||
QueueHandle_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xQueueGenericCreate( uxQueueLength, uxItemSize, ucQueueType );
|
||||
vTaskSetTimeOutState( pxTimeOut );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
BaseType_t MPU_xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, TickType_t * const pxTicksToWait )
|
||||
{
|
||||
BaseType_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xTaskCheckForTimeOut( pxTimeOut, pxTicksToWait );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( configUSE_TASK_NOTIFICATIONS == 1 )
|
||||
BaseType_t MPU_xTaskGenericNotify( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue )
|
||||
{
|
||||
BaseType_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xTaskGenericNotify( xTaskToNotify, ulValue, eAction, pulPreviousNotificationValue );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return xReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( configUSE_TASK_NOTIFICATIONS == 1 )
|
||||
BaseType_t MPU_xTaskNotifyWait( uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t *pulNotificationValue, TickType_t xTicksToWait )
|
||||
{
|
||||
BaseType_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xTaskNotifyWait( ulBitsToClearOnEntry, ulBitsToClearOnExit, pulNotificationValue, xTicksToWait );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return xReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( configUSE_TASK_NOTIFICATIONS == 1 )
|
||||
uint32_t MPU_ulTaskNotifyTake( BaseType_t xClearCountOnExit, TickType_t xTicksToWait )
|
||||
{
|
||||
uint32_t ulReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
ulReturn = ulTaskNotifyTake( xClearCountOnExit, xTicksToWait );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return ulReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
|
||||
QueueHandle_t MPU_xQueueGenericCreate( UBaseType_t uxQueueLength, UBaseType_t uxItemSize, uint8_t ucQueueType )
|
||||
{
|
||||
QueueHandle_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xQueueGenericCreate( uxQueueLength, uxItemSize, ucQueueType );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return xReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
QueueHandle_t MPU_xQueueGenericCreateStatic( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, uint8_t *pucQueueStorage, StaticQueue_t *pxStaticQueue, const uint8_t ucQueueType )
|
||||
{
|
||||
QueueHandle_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xQueueGenericCreateStatic( uxQueueLength, uxItemSize, pucQueueStorage, pxStaticQueue, ucQueueType );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return xReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
BaseType_t MPU_xQueueGenericReset( QueueHandle_t pxQueue, BaseType_t xNewQueue )
|
||||
{
|
||||
BaseType_t xReturn;
|
||||
|
@ -1013,6 +1127,17 @@ UBaseType_t uxReturn;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
UBaseType_t MPU_uxQueueSpacesAvailable( const QueueHandle_t xQueue )
|
||||
{
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
UBaseType_t uxReturn;
|
||||
|
||||
uxReturn = uxQueueSpacesAvailable( xQueue );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return uxReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
BaseType_t MPU_xQueueGenericReceive( QueueHandle_t pxQueue, void * const pvBuffer, TickType_t xTicksToWait, BaseType_t xJustPeeking )
|
||||
{
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
@ -1046,23 +1171,36 @@ void * xReturn;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if ( configUSE_MUTEXES == 1 )
|
||||
QueueHandle_t MPU_xQueueCreateMutex( void )
|
||||
#if( ( configUSE_MUTEXES == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
|
||||
QueueHandle_t MPU_xQueueCreateMutex( const uint8_t ucQueueType )
|
||||
{
|
||||
QueueHandle_t xReturn;
|
||||
QueueHandle_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xQueueCreateMutex( queueQUEUE_TYPE_MUTEX );
|
||||
xReturn = xQueueCreateMutex( ucQueueType );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return xReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if configUSE_COUNTING_SEMAPHORES == 1
|
||||
#if( ( configUSE_MUTEXES == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) )
|
||||
QueueHandle_t MPU_xQueueCreateMutexStatic( const uint8_t ucQueueType, StaticQueue_t *pxStaticQueue )
|
||||
{
|
||||
QueueHandle_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xQueueCreateMutexStatic( ucQueueType, pxStaticQueue );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return xReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( ( configUSE_COUNTING_SEMAPHORES == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
|
||||
QueueHandle_t MPU_xQueueCreateCountingSemaphore( UBaseType_t uxCountValue, UBaseType_t uxInitialCount )
|
||||
{
|
||||
QueueHandle_t xReturn;
|
||||
QueueHandle_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xQueueCreateCountingSemaphore( uxCountValue, uxInitialCount );
|
||||
|
@ -1072,6 +1210,20 @@ void * xReturn;
|
|||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( ( configUSE_COUNTING_SEMAPHORES == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) )
|
||||
|
||||
QueueHandle_t MPU_xQueueCreateCountingSemaphoreStatic( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount, StaticQueue_t *pxStaticQueue )
|
||||
{
|
||||
QueueHandle_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xQueueCreateCountingSemaphoreStatic( uxMaxCount, uxInitialCount, pxStaticQueue );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return xReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if ( configUSE_MUTEXES == 1 )
|
||||
BaseType_t MPU_xQueueTakeMutexRecursive( QueueHandle_t xMutex, TickType_t xBlockTime )
|
||||
{
|
||||
|
@ -1151,7 +1303,7 @@ void * xReturn;
|
|||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if configQUEUE_REGISTRY_SIZE > 0
|
||||
void MPU_vQueueAddToRegistry( QueueHandle_t xQueue, char *pcName )
|
||||
void MPU_vQueueAddToRegistry( QueueHandle_t xQueue, const char *pcName )
|
||||
{
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
|
@ -1162,6 +1314,32 @@ void * xReturn;
|
|||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if configQUEUE_REGISTRY_SIZE > 0
|
||||
void MPU_vQueueUnregisterQueue( QueueHandle_t xQueue )
|
||||
{
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
vQueueUnregisterQueue( xQueue );
|
||||
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if configQUEUE_REGISTRY_SIZE > 0
|
||||
const char *MPU_pcQueueGetName( QueueHandle_t xQueue )
|
||||
{
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
const char *pcReturn;
|
||||
|
||||
pcReturn = pcQueueGetName( xQueue );
|
||||
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
return pcReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void MPU_vQueueDelete( QueueHandle_t xQueue )
|
||||
{
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
@ -1224,6 +1402,247 @@ BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
|||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configUSE_TIMERS == 1 ) )
|
||||
TimerHandle_t MPU_xTimerCreate( const char * const pcTimerName, const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, TimerCallbackFunction_t pxCallbackFunction )
|
||||
{
|
||||
TimerHandle_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xTimerCreate( pcTimerName, xTimerPeriodInTicks, uxAutoReload, pvTimerID, pxCallbackFunction );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configUSE_TIMERS == 1 ) )
|
||||
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 )
|
||||
{
|
||||
TimerHandle_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xTimerCreateStatic( pcTimerName, xTimerPeriodInTicks, uxAutoReload, pvTimerID, pxCallbackFunction, pxTimerBuffer );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( configUSE_TIMERS == 1 )
|
||||
void *MPU_pvTimerGetTimerID( const TimerHandle_t xTimer )
|
||||
{
|
||||
void * pvReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
pvReturn = pvTimerGetTimerID( xTimer );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
|
||||
return pvReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( configUSE_TIMERS == 1 )
|
||||
void MPU_vTimerSetTimerID( TimerHandle_t xTimer, void *pvNewID )
|
||||
{
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
vTimerSetTimerID( xTimer, pvNewID );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( configUSE_TIMERS == 1 )
|
||||
BaseType_t MPU_xTimerIsTimerActive( TimerHandle_t xTimer )
|
||||
{
|
||||
BaseType_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xTimerIsTimerActive( xTimer );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( configUSE_TIMERS == 1 )
|
||||
TaskHandle_t MPU_xTimerGetTimerDaemonTaskHandle( void )
|
||||
{
|
||||
TaskHandle_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xTimerGetTimerDaemonTaskHandle();
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( ( INCLUDE_xTimerPendFunctionCall == 1 ) && ( configUSE_TIMERS == 1 ) )
|
||||
BaseType_t MPU_xTimerPendFunctionCall( PendedFunction_t xFunctionToPend, void *pvParameter1, uint32_t ulParameter2, TickType_t xTicksToWait )
|
||||
{
|
||||
BaseType_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xTimerPendFunctionCall( xFunctionToPend, pvParameter1, ulParameter2, xTicksToWait );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( configUSE_TIMERS == 1 )
|
||||
const char * MPU_pcTimerGetName( TimerHandle_t xTimer )
|
||||
{
|
||||
const char * pcReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
pcReturn = pcTimerGetName( xTimer );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
|
||||
return pcReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( configUSE_TIMERS == 1 )
|
||||
TickType_t MPU_xTimerGetPeriod( TimerHandle_t xTimer )
|
||||
{
|
||||
TickType_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xTimerGetPeriod( xTimer );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( configUSE_TIMERS == 1 )
|
||||
TickType_t MPU_xTimerGetExpiryTime( TimerHandle_t xTimer )
|
||||
{
|
||||
TickType_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xTimerGetExpiryTime( xTimer );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( configUSE_TIMERS == 1 )
|
||||
BaseType_t MPU_xTimerGenericCommand( TimerHandle_t xTimer, const BaseType_t xCommandID, const TickType_t xOptionalValue, BaseType_t * const pxHigherPriorityTaskWoken, const TickType_t xTicksToWait )
|
||||
{
|
||||
BaseType_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xTimerGenericCommand( xTimer, xCommandID, xOptionalValue, pxHigherPriorityTaskWoken, xTicksToWait );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
|
||||
EventGroupHandle_t MPU_xEventGroupCreate( void )
|
||||
{
|
||||
EventGroupHandle_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xEventGroupCreate();
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
EventGroupHandle_t MPU_xEventGroupCreateStatic( StaticEventGroup_t *pxEventGroupBuffer )
|
||||
{
|
||||
EventGroupHandle_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xEventGroupCreateStatic( pxEventGroupBuffer );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
EventBits_t MPU_xEventGroupWaitBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToWaitFor, const BaseType_t xClearOnExit, const BaseType_t xWaitForAllBits, TickType_t xTicksToWait )
|
||||
{
|
||||
EventBits_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xEventGroupWaitBits( xEventGroup, uxBitsToWaitFor, xClearOnExit, xWaitForAllBits, xTicksToWait );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToClear )
|
||||
{
|
||||
EventBits_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xEventGroupClearBits( xEventGroup, uxBitsToClear );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet )
|
||||
{
|
||||
EventBits_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xEventGroupSetBits( xEventGroup, uxBitsToSet );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet, const EventBits_t uxBitsToWaitFor, TickType_t xTicksToWait )
|
||||
{
|
||||
EventBits_t xReturn;
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
xReturn = xEventGroupSync( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTicksToWait );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void MPU_vEventGroupDelete( EventGroupHandle_t xEventGroup )
|
||||
{
|
||||
BaseType_t xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
vEventGroupDelete( xEventGroup );
|
||||
portRESET_PRIVILEGE( xRunningPrivileged );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Functions that the application writer wants to execute in privileged mode
|
||||
can be defined in application_defined_privileged_functions.h. The functions
|
||||
|
|
|
@ -394,7 +394,7 @@ uint32_t ulAPSR, ulCycles = 8; /* 8 bits per byte. */
|
|||
}
|
||||
}
|
||||
|
||||
/* Will only get here if xTaskStartScheduler() was called with the CPU in
|
||||
/* Will only get here if vTaskStartScheduler() was called with the CPU in
|
||||
a non-privileged mode or the binary point register was not set to its lowest
|
||||
possible value. prvTaskExitError() is referenced to prevent a compiler
|
||||
warning about it being defined but not referenced in the case that the user
|
||||
|
|
|
@ -268,7 +268,7 @@ uint32_t ulAPSR;
|
|||
vPortRestoreTaskContext();
|
||||
}
|
||||
|
||||
/* Will only get here if xTaskStartScheduler() was called with the CPU in
|
||||
/* Will only get here if vTaskStartScheduler() was called with the CPU in
|
||||
a non-privileged mode or the binary point register was not set to its lowest
|
||||
possible value. prvTaskExitError() is referenced to prevent a compiler
|
||||
warning about it being defined but not referenced in the case that the user
|
||||
|
|
|
@ -254,7 +254,7 @@ uint32_t ulAPSR;
|
|||
vPortRestoreTaskContext();
|
||||
}
|
||||
|
||||
/* Will only get here if xTaskStartScheduler() was called with the CPU in
|
||||
/* Will only get here if vTaskStartScheduler() was called with the CPU in
|
||||
a non-privileged mode or the binary point register was not set to its lowest
|
||||
possible value. */
|
||||
return 0;
|
||||
|
|
|
@ -314,7 +314,7 @@ uint32_t ulAPSR;
|
|||
}
|
||||
}
|
||||
|
||||
/* Will only get here if xTaskStartScheduler() was called with the CPU in
|
||||
/* Will only get here if vTaskStartScheduler() was called with the CPU in
|
||||
a non-privileged mode or the binary point register was not set to its lowest
|
||||
possible value. */
|
||||
return 0;
|
||||
|
|
|
@ -265,7 +265,7 @@ uint32_t ulAPSR;
|
|||
vPortRestoreTaskContext();
|
||||
}
|
||||
|
||||
/* Will only get here if xTaskStartScheduler() was called with the CPU in
|
||||
/* Will only get here if vTaskStartScheduler() was called with the CPU in
|
||||
a non-privileged mode or the binary point register was not set to its lowest
|
||||
possible value. prvTaskExitError() is referenced to prevent a compiler
|
||||
warning about it being defined but not referenced in the case that the user
|
||||
|
|
|
@ -72,7 +72,6 @@
|
|||
#include "FreeRTOSConfig.h"
|
||||
#include "ISR_Support.h"
|
||||
|
||||
|
||||
.extern pxCurrentTCB
|
||||
.extern vTaskSwitchContext
|
||||
.extern vPortIncrementTick
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue