Index: firmware/App/Drivers/InternalADC.h =================================================================== diff -u -r8cbddbe34a4ffed5a4d9fac07a065799c5862611 -r56100135135bb715d316b5fd002a4a4951b9334a --- firmware/App/Drivers/InternalADC.h (.../InternalADC.h) (revision 8cbddbe34a4ffed5a4d9fac07a065799c5862611) +++ firmware/App/Drivers/InternalADC.h (.../InternalADC.h) (revision 56100135135bb715d316b5fd002a4a4951b9334a) @@ -14,12 +14,12 @@ * @date (original) 07-Aug-2024 * ***************************************************************************/ - -#ifndef __INT_ADC_H__ -#define __INT_ADC_H__ - -#include "TDCommon.h" - + +#ifndef __INT_ADC_H__ +#define __INT_ADC_H__ + +#include "TDCommon.h" + /** * @defgroup InternalADC InternalADC * @brief The internal ADC unit provides functions for reading the sampled @@ -29,16 +29,16 @@ * @{ */ -// ********** public definitions ********** - -#define INT_ADC_BITS_PER_CHANNEL 12 ///< Internal ADC channels are 12-bit. -#define INT_ADC_FULL_SCALE_BITS 4096 ///< Internal ADC has 4096 full scale counts per channel. -#define INT_ADC_ZERO 1998 ///< For signed 2's compliment data, zero is here. -#define INT_ADC_REF_V 3.0F ///< Internal ADC reference voltage is 3.0V. +// ********** public definitions ********** -/// Enumeration of internal ADC channels that are used. -typedef enum Int_ADC_Channels -{ +#define INT_ADC_BITS_PER_CHANNEL 12 ///< Internal ADC channels are 12-bit. +#define INT_ADC_FULL_SCALE_BITS 4096 ///< Internal ADC has 4096 full scale counts per channel. +#define INT_ADC_ZERO 1998 ///< For signed 2's compliment data, zero is here. +#define INT_ADC_REF_V 3.0F ///< Internal ADC reference voltage is 3.0V. + +/// Enumeration of internal ADC channels that are used. +typedef enum Int_ADC_Channels +{ INT_ADC_NOT_USED = 0, ///< Not used INT_ADC_BLOOD_PUMP_SPEED, ///< Internal ADC channel for blood pump speed INT_ADC_BLOOD_PUMP_MOTOR_CURRENT, ///< Internal ADC channel for blood pump current @@ -55,18 +55,18 @@ INT_ADC_PRIMARY_ALARM_CURRENT_LG, ///< Internal ADC channel for primary alarm audio current low gain 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 ); +// 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 ); - +F32 getIntADCVoltageConverted( INT_ADC_CHANNEL_T channel ); + /**@}*/ -#endif +#endif