mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
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:
parent
29ca4f1b36
commit
51d9ee0c1c
|
@ -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
|
Loading…
Reference in a new issue