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.

This commit is contained in:
Richard Barry 2013-06-07 09:45:34 +00:00
parent 29ca4f1b36
commit 51d9ee0c1c

View file

@ -1208,3 +1208,21 @@ portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();
return xReturn; 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