From 37f03f2b2f1126a6dba8049276a32ba5dc4032ce Mon Sep 17 00:00:00 2001 From: richardbarry Date: Fri, 7 Jun 2013 09:45:34 +0000 Subject: [PATCH] Add configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS mechanism to the relevant port.c file to allow the user to define functions that will execute in privileged mode. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1920 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- .../Source/portable/GCC/ARM_CM3_MPU/port.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/port.c index ffc58598a..7488f5ee7 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/port.c @@ -1208,3 +1208,21 @@ portBASE_TYPE xRunningPrivileged = prvRaisePrivilege(); return xReturn; } +/* Functions that the application writer wants to execute in privileged mode +can be defined in application_defined_privileged_functions.h. The functions +must take the same format as those above whereby the privilege state on exit +equals the privilege state on entry. For example: + +void MPU_FunctionName( [parameters ] ) +{ +portBASE_TYPE xRunningPrivileged = prvRaisePrivilege(); + + FunctionName( [parameters ] ); + + portRESET_PRIVILEGE( xRunningPrivileged ); +} +*/ + +#if configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS == 1 + #include "application_defined_privileged_functions.h" +#endif \ No newline at end of file -- 2.39.5