Index: firmware/App/Drivers/InternalADC.c =================================================================== diff -u -rdc0d9b087c609e71cacdb7f0395cccf29d749c00 -r2fe8834dda9d8f69068c151ff0474d915eef6eb5 --- firmware/App/Drivers/InternalADC.c (.../InternalADC.c) (revision dc0d9b087c609e71cacdb7f0395cccf29d749c00) +++ firmware/App/Drivers/InternalADC.c (.../InternalADC.c) (revision 2fe8834dda9d8f69068c151ff0474d915eef6eb5) @@ -30,7 +30,7 @@ #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. +/// ADC channel number to ADC channel ID (enumeration) look-up table. const INT_ADC_CHANNEL_T adcChannelNum2ChannelId[ MAX_ADC_CHANNELS ] = { INT_ADC_RO_PUMP_INLET_PRESSURE, // 0 @@ -61,18 +61,14 @@ // ********** 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 ]; ///< 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. +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 ********** - - - /*********************************************************************//** * @brief initInternalADC * The initInternalADC function initializes the InternalADC module. @@ -106,7 +102,7 @@ /*********************************************************************//** * @brief - * The adcNotification function handles an ADC conversion complete interrupt. \n + * The adcNotification function handles an ADC conversion complete interrupt. * All channel readings in the FIFO are retrieved. * @details * Inputs : ADC FIFO @@ -125,7 +121,7 @@ /*********************************************************************//** * @brief execInternalADC - * The execInternalADC function processes the last set of raw ADC channel \n + * The execInternalADC function processes the last set of raw ADC channel * readings and kicks off the next conversion of ADC channels. * @details * Inputs : adcRawReadingsCount, adcRawReadings[] @@ -163,8 +159,7 @@ /*********************************************************************//** * @brief getIntADCReading - * The getIntADCReading function gets the latest average reading for a given \n - * channel. + * The getIntADCReading function gets the latest average reading for a given channel. * @details * Inputs : adcReadingsAvgs[] * Outputs : none