//================================================================================================= // // Company: Paul Scherrer Institut // 5232 Villigen PSI // Switzerland // //------------------------------------------------------------------------------------------------- // // Project: Peltier Controller V2 // Author: Noah Piqué (noah.pique@psi.ch) // //------------------------------------------------------------------------------------------------- // // Module: Error Handler // Filename: ERRH_ErrorHandler.c // Date: Handled by Subversion (version control system) // Revision: Handled by Subversion (version control system) // History: Handled by Subversion (version control system) // //------------------------------------------------------------------------------------------------- // // Description: This source file contains all functions dealing with internal Errors // //================================================================================================= //================================================================================================= // Section: INCLUDES // Description: List of required include files. //================================================================================================= #include "ERRH_ErrorHandler.h" #include "VARH_VariableHandler.h" // Toolbox #include "../Toolbox/UTIL_Utility.h" // include STM32 drivers #include "stm32l4xx_hal.h" #include "cmsis_os2.h" //================================================================================================= // Section: DEFINITIONS // Description: Definition of local constants (visible by this module only). //================================================================================================= //================================================================================================= // Section: MACROS // Description: Definition of local macros (visible by this module only). //================================================================================================= //================================================================================================= // Section: ENUMERATIONS // Description: Definition of local enumerations (visible by this module only). //================================================================================================= //================================================================================================= // Section: STRUCTURES // Description: Definition of local Structures (visible by this module only). //================================================================================================= //================================================================================================= // Section: LOCAL VARIABLES // Description: Definition of local variables (visible by this module only). //================================================================================================= //================================================================================================= // Section: LOCAL CONSTANTS // Description: Definition of local constants (visible by this module only). //================================================================================================= //================================================================================================= // Section: LOCAL FUNCTIONS (PROTOTYPES) // Description: Definition of local functions (visible by this module only). //================================================================================================= //================================================================================================= // Section: GLOBAL FUNCTIONS // Description: Definition (implementation) of global functions. //================================================================================================= //------------------------------------------------------------------------------------------------- // Function: USFL_boInitializeModule // Description: Initializes the module. Function must be called once immediately after power-up. // Parameters: None // Returns: Boolean TRUE if successful //------------------------------------------------------------------------------------------------- BOOL ERRH_boInitializeModule( VOID ) { BOOL boOK = TRUE; // nothing to do yet in init return( boOK ); } VOID ERRH_vClearError( VOID ) { VARH_vSetVariableDataFromSystemU32( VARH_eError, NO_ERROR ); } VOID ERRH_vSetError( U32 u32Error ) { VARH_vSetVariableDataFromSystemU32( VARH_eError, u32Error ); } U32 ERRH_u32GetError( VOID ) { return( VARH_u32GetVariableData( VARH_eError ) ); } //================================================================================================= // Section: LOCAL FUNCTIONS // Descriptionn: Definition (implementation) of local functions. //=================================================================================================