


/*
 * This is a template file. It defines integration functions necessary to complete RTA-BSW.
 * The integrator must complete the templates before deploying software containing functions defined in this file.
 * Once templates have been completed, the integrator should delete the #error line.
 * Note: The integrator is responsible for updates made to this file.
 *
 * To remove the following error define the macro NOT_READY_FOR_TESTING_OR_DEPLOYMENT with a compiler option (e.g. -D NOT_READY_FOR_TESTING_OR_DEPLOYMENT)
 * The removal of the error only allows the user to proceed with the building phase
 */
/* #ifndef NOT_READY_FOR_TESTING_OR_DEPLOYMENT
#error The content of this file is a template which provides empty stubs. The content of this file must be completed by the integrator accordingly to project specific requirements
#else
#warning The content of this file is a template which provides empty stubs. The content of this file must be completed by the integrator accordingly to project specific requirements
#endif */ /* NOT_READY_FOR_TESTING_OR_DEPLOYMENT */


#ifndef DEM_CFG_SCHM_H
#define DEM_CFG_SCHM_H

/**
 * \file
 * \ingroup DEM_PRJ_TPL
 * \brief Exclusive area handling for Dem
 *
 * Defines macros to lock critical regions in Dem. They can be adapted to avoid the overhead of locking in deployments
 * where that is not necessary (e.g. if Dem and Dcm are running in the same task, the lock between them can be avoided).
 */


/* This lock is always required, as the monitorings are usually runing in different tasks as DEM and
 * therefore may interrupt the processing of DEM at any time.
 */

LOCAL_INLINE FUNC(void, COM_CODE) SchM_Enter_Dem_Monitoring(void);
LOCAL_INLINE FUNC(void, COM_CODE) SchM_Exit_Dem_Monitoring(void);



LOCAL_INLINE FUNC(void, COM_CODE) SchM_Enter_Dem_Monitoring (void)
{
    /*The integrator shall place his code here which would disable/lock the interrupt*/

}

LOCAL_INLINE FUNC(void, COM_CODE) SchM_Exit_Dem_Monitoring (void)
{
    /*The integrator shall place his code here which would enable/unlock the interrupt*/

}
/* This lock is required if DEM and NVM may interrupt each other, e.g. if both components
 * are running in different tasks on a single CPU
 */

LOCAL_INLINE FUNC(void, COM_CODE) SchM_Enter_Dem_Nvm(void);
LOCAL_INLINE FUNC(void, COM_CODE) SchM_Exit_Dem_Nvm(void);



LOCAL_INLINE FUNC(void, COM_CODE) SchM_Enter_Dem_Nvm (void)
{
    /*The integrator shall place his code here which would disable/lock the interrupt*/

}

LOCAL_INLINE FUNC(void, COM_CODE) SchM_Exit_Dem_Nvm (void)
{
    /*The integrator shall place his code here which would enable/unlock the interrupt*/

}
/* This lock is required if DEM and DCM may interrupt each other, e.g. if both components
 * are running in different tasks on a single CPU
 */

LOCAL_INLINE FUNC(void, COM_CODE) SchM_Enter_Dem_Dcm(void);
LOCAL_INLINE FUNC(void, COM_CODE) SchM_Exit_Dem_Dcm(void);



LOCAL_INLINE FUNC(void, COM_CODE) SchM_Enter_Dem_Dcm (void)
{
    /*The integrator shall place his code here which would disable/lock the interrupt*/

}

LOCAL_INLINE FUNC(void, COM_CODE) SchM_Exit_Dem_Dcm (void)
{
    /*The integrator shall place his code here which would enable/unlock the interrupt*/

}

#endif


