/************************************************************************** * * Copyright (c) 2020-2024 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * @file Heaters.h * * @author (last) Dara Navaei * @date (last) 02-Feb-2023 * * @author (original) Dara Navaei * @date (original) 23-Apr-2020 * ***************************************************************************/ #ifndef _HEATERS_H_ #define _HEATERS_H_ #include "DGCommon.h" /** * @defgroup Heaters Heaters * @brief Heaters driver modules. Controls the primary and trimmer heaters. * The primary heaters are manufactured by Heatron, PN: UEL14EXK2A-Rev D with * fluid operating temperature in between 5 degrees C and 95 degrees C. * The trimmer heater is manufactured by Heatron, PN: UEL5EXK1A-Rev D with * fluid operating temperature in between 5 degrees C and 95 degrees C. * * @addtogroup Heaters * @{ */ // ********** Public definitions ********** /// Name of DG heaters typedef enum Heaters { DG_PRIMARY_HEATER = 0, ///< DG primary heater DG_TRIMMER_HEATER, ///< DG trimmer heater NUM_OF_DG_HEATERS, ///< Number of the heaters } DG_HEATERS_T; /// Trimmer heater command data structure typedef struct { BOOL startHeater; ///< Flag indicates start or stop heater } TRIMMER_HEATER_CMD_T; // ********** Public function prototypes ********** void initHeaters( void ); BOOL setHeaterTargetTemperature( DG_HEATERS_T heater, F32 targetTemperature ); BOOL startHeater( DG_HEATERS_T heater ); F32 getHeaterTargetTemperature( DG_HEATERS_T heater ); BOOL isHeaterOn( DG_HEATERS_T heater ); void stopHeater( DG_HEATERS_T heater ); void execHeaters( void ); void execHeatersMonitor( void ); void resetHeatersEstimationGain( void ); void calculateHeaterEstimationGain( DG_HEATERS_T heater ); void setTrimmerHeaterUseLastDutyCycleStatus( BOOL status ); BOOL testSetHeaterDutyCycleOverride( U32 heater, F32 value ); BOOL testResetHeaterDutyCycleOverride( U32 heater ); BOOL testHeatersPublishIntervalOverride( TEST_OVERRIDE_PAYLOAD_T value ); //BOOL testResetHeatersPublishIntervalOverride( void ); /**@}*/ #endif