Index: firmware/App/Drivers/InternalADC.h =================================================================== diff -u -re7fe0454b5b2d39009dc784dc8c156856df8bc86 -red39129abdca4ec343369d83494530b23621e052 --- firmware/App/Drivers/InternalADC.h (.../InternalADC.h) (revision e7fe0454b5b2d39009dc784dc8c156856df8bc86) +++ firmware/App/Drivers/InternalADC.h (.../InternalADC.h) (revision ed39129abdca4ec343369d83494530b23621e052) @@ -14,31 +14,31 @@ * @date (original) 13-Aug-2024 * ***************************************************************************/ - -#ifndef __INT_ADC_H__ -#define __INT_ADC_H__ - -#include "DDCommon.h" - -/** - * @defgroup InternalADC InternalADC + +#ifndef __INT_ADC_H__ +#define __INT_ADC_H__ + +#include "DDCommon.h" + +/** + * @defgroup InternalADC InternalADC * @brief DD internal ADC unit. This unit converts all analog channel (DD * different voltage rails, pressure, temperature) into digital value for further - * processing ( monitoring and controls). - * - * @addtogroup InternalADC - * @{ - */ - -// ********** public definitions ********** + * processing ( monitoring and controls). + * + * @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 -{ + +/// Enumeration of DD internal ADC channels. +typedef enum Int_ADC_Channels +{ INT_ADC_NOT_USED = 0, ///< Not used INT_ADC_3_3V_SENSOR_ADC_REF, ///< Internal ADC channel for 3.3V sensor volatge INT_ADC_24V_ACTUATORS_REG, ///< Internal ADC channel for 24V regen (diode drop) to actuators @@ -50,17 +50,17 @@ INT_ADC_5V_LOGIC, ///< Internal ADC channel for 5V to logic INT_ADC_24V_ACTUATORS, ///< Internal ADC channel for 24V to actuators INT_ADC_BACKUP_V, ///< Internal ADC channel for VBackup - //INT_ADC_DUMMY, ///< Internal ADC channel - not used, needed to get even number of channels - NUM_OF_INT_ADC_CHANNELS ///< Number of used internal ADC channels. -} INT_ADC_CHANNEL_T; - -// ********** public function prototypes ********** - -void initInternalADC( void ); -void execInternalADC( void ); -U16 getIntADCReading( INT_ADC_CHANNEL_T channel ); + INT_ADC_DUMMY, ///< Internal ADC channel - not used, needed to get even number of channels + NUM_OF_INT_ADC_CHANNELS ///< Number of used 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 +/**@}*/ + +#endif