Index: firmware/App/Drivers/InternalADC.c =================================================================== diff -u -ra49bd0780d97bb4ce04a9d7b128a6e3c2df044e1 -rebd11d01f826a08806d2f4984bd57e829371b687 --- firmware/App/Drivers/InternalADC.c (.../InternalADC.c) (revision a49bd0780d97bb4ce04a9d7b128a6e3c2df044e1) +++ firmware/App/Drivers/InternalADC.c (.../InternalADC.c) (revision ebd11d01f826a08806d2f4984bd57e829371b687) @@ -18,12 +18,18 @@ #include "InternalADC.h" +/** + * @addtogroup InternalADC + * @{ + */ + // ********** private definitions ********** -#define MAX_ADC_CHANNELS 24 // ADC supports up to 24 channels -#define SIZE_OF_ROLLING_AVG 16 // samples in rolling average calculations -#define ROLLING_AVG_SHIFT_DIVIDER 4 // rolling average shift divider +#define MAX_ADC_CHANNELS 24 ///< DG internal ADC supports up to 24 channels. +#define SIZE_OF_ROLLING_AVG 16 ///< Number of DG internal ADC samples in rolling average calculations for each channel. +#define ROLLING_AVG_SHIFT_DIVIDER 4 ///< Rolling average shift divider for DG internal ADC readings. +/// ADC channel # to ADC channel ID (enumeration) look-up table. const INT_ADC_CHANNEL_T adcChannelNum2ChannelId[ MAX_ADC_CHANNELS ] = { INT_ADC_RO_PUMP_INLET_PRESSURE, // 0 @@ -54,13 +60,13 @@ // ********** private data ********** -static adcData_t adcRawReadings[ NUM_OF_INT_ADC_CHANNELS ]; // buffer holds latest adc channel readings -static U32 adcRawReadingsCount = 0; // readings count for raw readings buffer +static adcData_t adcRawReadings[ NUM_OF_INT_ADC_CHANNELS ]; ///< buffer holds latest adc channel readings. +static U32 adcRawReadingsCount = 0; ///< readings count for raw readings buffer. -static U16 adcReadings[ NUM_OF_INT_ADC_CHANNELS ][ SIZE_OF_ROLLING_AVG ]; // holds samples for each channel for a rolling average -static U32 adcReadingsIdx[ NUM_OF_INT_ADC_CHANNELS ]; // index for next reading in each rolling average array -static U32 adcReadingsTotals[ NUM_OF_INT_ADC_CHANNELS ]; // rolling total for each channel - used to calc average -static U32 adcReadingsAvgs[ NUM_OF_INT_ADC_CHANNELS ]; // rolling average for each channel +static U16 adcReadings[ NUM_OF_INT_ADC_CHANNELS ][ SIZE_OF_ROLLING_AVG ]; ///< buffer holds samples for each channel for a rolling average. +static U32 adcReadingsIdx[ NUM_OF_INT_ADC_CHANNELS ]; ///< index for next reading in each rolling average buffer. +static U32 adcReadingsTotals[ NUM_OF_INT_ADC_CHANNELS ]; ///< rolling sum for each ADC channel - used to calc average. +static U32 adcReadingsAvgs[ NUM_OF_INT_ADC_CHANNELS ]; ///< rolling average for each ADC channel. // ********** private function prototypes ********** @@ -181,3 +187,4 @@ return result; } +/**@}*/