/************************************************************************** * * Copyright (c) 2024-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 InternalADC.h * * @author (last) Vinayakam Mani * @date (last) 13-Aug-2024 * * @author (original) Vinayakam Mani * @date (original) 13-Aug-2024 * ***************************************************************************/ #ifndef __INT_ADC_H__ #define __INT_ADC_H__ #include "DDCommon.h" /** * @defgroup InternalADC InternalADC * @brief DD internal ADC module. * * @addtogroup InternalADC * @{ */ // ********** public definitions ********** #define INT_ADC_BITS_PER_CHANNEL 12 ///< DD internal ADC bits per channel. #define INT_ADC_FULL_SCALE_BITS 4095 ///< DD internal ADC full scale range. #define INT_ADC_REF_V 3.0F ///< DD internal ADC reference voltage. /// Enumeration of DD internal ADC channels. typedef enum Int_ADC_Channels { INT_ADC_NOT_USED = 0, ///< DD internal ADC channel not used INT_ADC_RO_PUMP_INLET_PRESSURE, ///< DD internal ADC RO pump inlet pressure channel INT_ADC_RO_PUMP_OUTLET_PRESSURE, ///< DD internal ADC RO pump outlet pressure channel INT_ADC_DRAIN_PUMP_OUTLET_PRESSURE, ///< DD internal ADC drain pump outlet pressure channel INT_ADC_DRAIN_PUMP_INLET_PRESSURE, ///< DD internal ADC drain pump inlet pressure channel INT_ADC_RO_PUMP_FEEDBACK_DUTY_CYCLE, ///< DD internal ADC RO pump feedback duty cycle channel INT_ADC_AVAILABLE_CHANNEL, ///< DD internal ADC available channel INT_ADC_SECONDARY_HEATER_24_VOLTS, ///< DD internal ADC secondary heater 24 volt supply channel INT_ADC_TRIMMER_HEATER_24_VOLTS, ///< DD internal ADC trimmer heater 24 volt supply channel INT_ADC_BOARD_THERMISTOR, ///< DD internal ADC DD board thermistor channel INT_ADC_FPGA_1_8_VOLTS, ///< DD internal ADC DD FPGA 1.8 volt supply channel INT_ADC_FPGA_1_VOLT, ///< DD internal ADC DD FPGA 1 volt supply channel INT_ADC_PROCESSOR_1_8_VOLTS, ///< DD internal ADC DD processor 1.8 volt supply channel INT_ADC_PROCESSOR_1_2_VOLTS, ///< DD internal ADC DD processor 1.2 volt supply channel INT_ADC_SENSORS_3_3_VOLTS, ///< DD internal ADC DD sensors 3.3 volt supply channel INT_ADC_SENSORS_5_VOLTS, ///< DD internal ADC DD sensors 5 volt supply channel INT_ADC_MAIN_24_VOLTS, ///< DD internal ADC DD 24 volt supply channel INT_ADC_LOGIC_5_VOLTS, ///< DD internal ADC DD logic 5 volt supply channel INT_ADC_3_3_VOLTS, ///< DD internal ADC DD 3.3 volt supply channel INT_ADC_REFERENCE_VOLTAGE, ///< DD internal ADC reference voltage channel INT_ADC_REF_IN1, ///< DD internal ADC external ADC1 reference voltage channel INT_ADC_REF_IN2, ///< DD internal ADC external ADC2 reference voltage channel INT_ADC_POWER_SUPPLY_1_THERMISTOR, ///< DD internal ADC DD power supply 1 thermistor INT_ADC_MAIN_NON_ISOLATED_24_VOLTS, ///< DD internal ADC DD 24 volts non-isolated voltage channel INT_ADC_POWER_SUPPLY_GATE_DRIVER, ///< DD internal ADC DD power supply gate driver NUM_OF_INT_ADC_CHANNELS ///< Number of DD internal ADC channels } INT_ADC_CHANNEL_T; // ********** public function prototypes ********** void initInternalADC( void ); void execInternalADC( void ); U16 getIntADCReading( INT_ADC_CHANNEL_T channel ); F32 getIntADCVoltageConverted( INT_ADC_CHANNEL_T channel ); /**@}*/ #endif