Index: firmware/App/Drivers/CPLD.c =================================================================== diff -u -rdc0d9b087c609e71cacdb7f0395cccf29d749c00 -r2fe8834dda9d8f69068c151ff0474d915eef6eb5 --- firmware/App/Drivers/CPLD.c (.../CPLD.c) (revision dc0d9b087c609e71cacdb7f0395cccf29d749c00) +++ firmware/App/Drivers/CPLD.c (.../CPLD.c) (revision 2fe8834dda9d8f69068c151ff0474d915eef6eb5) @@ -20,33 +20,33 @@ #include "WatchdogMgmt.h" #include "CPLD.h" + +/** + * @addtogroup CPLD + * @{ + */ // ********** private definitions ********** -// GIO port B pin assignments for pins connected to CPLD -#define OFF_REQUEST_GIO_PORT_PIN 0U -#define WD_PET_GIO_PORT_PIN 1U -#define WD_EXP_GIO_PORT_PIN 2U -#define LAMP_GRN_SPI5_PORT_MASK 0x00000200 // (CLK(100) - re-purposed as output GPIO) -#define LAMP_BLU_SPI5_PORT_MASK 0x00010000 // (SIMO[0](99) - re-purposed as output GPIO) -#define LAMP_RED_SPI5_PORT_MASK 0x01000000 // (SOMI[0](98) - re-purposed as output GPIO) +#define WD_PET_GIO_PORT_PIN 1U ///< Watchdog pet GPIO pin number. +#define WD_EXP_GIO_PORT_PIN 2U ///< Watchdog expired GPIO pin number. +#define LAMP_GRN_SPI5_PORT_MASK 0x00000200 ///< Lamp green GPIO port mask (CLK(100) - re-purposed as output GPIO). +#define LAMP_BLU_SPI5_PORT_MASK 0x00010000 ///< Lamp blue GPIO port mask (SIMO[0](99) - re-purposed as output GPIO). +#define LAMP_RED_SPI5_PORT_MASK 0x01000000 ///< Lamp red GPIO port mask (SOMI[0](98) - re-purposed as output GPIO). -// CPLD pin I/O macros -#define GET_WD_EXP() ( PIN_SIGNAL_STATE_T )( gioGetBit( gioPORTB, WD_EXP_GIO_PORT_PIN ) ) +#define GET_WD_EXP() ( PIN_SIGNAL_STATE_T )( gioGetBit( gioPORTB, WD_EXP_GIO_PORT_PIN ) ) ///< Get watchdog expired pin state macro. +#define TGL_WD_PET() gioToggleBit( gioPORTB, WD_PET_GIO_PORT_PIN ) ///< Toggle watchdog GPIO macro. +#define SET_WD_PET() gioSetBit( gioPORTB, WD_PET_GIO_PORT_PIN, PIN_SIGNAL_HIGH ) ///< Set watchdog GPIO macro. +#define CLR_WD_PET() gioSetBit( gioPORTB, WD_PET_GIO_PORT_PIN, PIN_SIGNAL_LOW ) ///< Clear watchdog GPIO macro. -#define TGL_WD_PET() gioToggleBit( gioPORTB, WD_PET_GIO_PORT_PIN ) -#define SET_WD_PET() gioSetBit( gioPORTB, WD_PET_GIO_PORT_PIN, PIN_SIGNAL_HIGH ) - -#define CLR_WD_PET() gioSetBit( gioPORTB, WD_PET_GIO_PORT_PIN, PIN_SIGNAL_LOW ) - -#define SET_GREEN() {mibspiREG5->PC3 |= LAMP_GRN_SPI5_PORT_MASK;} -#define CLR_GREEN() {mibspiREG5->PC3 &= ~LAMP_GRN_SPI5_PORT_MASK;} -#define SET_BLUE() {mibspiREG5->PC3 |= LAMP_BLU_SPI5_PORT_MASK;} -#define CLR_BLUE() {mibspiREG5->PC3 &= ~LAMP_BLU_SPI5_PORT_MASK;} -#define SET_RED() {mibspiREG5->PC3 |= LAMP_RED_SPI5_PORT_MASK;} -#define CLR_RED() {mibspiREG5->PC3 &= ~LAMP_RED_SPI5_PORT_MASK;} - -/************************************************************************* +#define SET_GREEN() {mibspiREG5->PC3 |= LAMP_GRN_SPI5_PORT_MASK;} ///< Set alarm lamp green signal. +#define CLR_GREEN() {mibspiREG5->PC3 &= ~LAMP_GRN_SPI5_PORT_MASK;} ///< Clear alarm lamp green signal. +#define SET_BLUE() {mibspiREG5->PC3 |= LAMP_BLU_SPI5_PORT_MASK;} ///< Set alarm lamp blue signal. +#define CLR_BLUE() {mibspiREG5->PC3 &= ~LAMP_BLU_SPI5_PORT_MASK;} ///< Clear alarm lamp blue signal. +#define SET_RED() {mibspiREG5->PC3 |= LAMP_RED_SPI5_PORT_MASK;} ///< Set alarm lamp red signal. +#define CLR_RED() {mibspiREG5->PC3 &= ~LAMP_RED_SPI5_PORT_MASK;} ///< Clear alarm lamp red signal. + +/*********************************************************************//** * @brief initCPLD * The initCPLD function initializes the CPLD module. * @details @@ -64,8 +64,8 @@ CLR_RED(); CLR_BLUE(); } - -/************************************************************************* + +/*********************************************************************//** * @brief toggleCPLDWatchdog * The toggleCPLDWatchdog function toggles the watchdog pet signal to CPLD. * @details @@ -77,27 +77,26 @@ { TGL_WD_PET(); } - -/************************************************************************* + +/*********************************************************************//** * @brief getCPLDWatchdogExpired - * The getCPLDWatchdogExpired function determines the current signal level \n + * The getCPLDWatchdogExpired function determines the current signal level * on the watchdog expired pin from the CPLD. * @details * Inputs : Signal from CPLD on watchdog expired pin. * Outputs : none - * @return level : (LOW or HIGH) + * @return level (LOW or HIGH) *************************************************************************/ PIN_SIGNAL_STATE_T getCPLDWatchdogExpired( void ) { PIN_SIGNAL_STATE_T level = GET_WD_EXP(); return level; } - -/************************************************************************* + +/*********************************************************************//** * @brief setCPLDLampGreen - * The setCPLDLampGreen function sets the alarm lamp green signal to CPLD \n - * to given level. + * The setCPLDLampGreen function sets the alarm lamp green signal to CPLD to given level. * @details * Inputs : none * Outputs : alarm lamp green signal set to given level. @@ -115,11 +114,10 @@ CLR_GREEN(); } } - -/************************************************************************* + +/*********************************************************************//** * @brief setCPLDLampBlue - * The setCPLDLampBlue function sets the alarm lamp blue signal to CPLD \n - * to given level. + * The setCPLDLampBlue function sets the alarm lamp blue signal to CPLD to given level. * @details * Inputs : none * Outputs : alarm lamp blue signal set to given level. @@ -137,11 +135,10 @@ CLR_BLUE(); } } - -/************************************************************************* + +/*********************************************************************//** * @brief setCPLDLampRed - * The setCPLDLampRed function sets the alarm lamp red signal to CPLD \n - * to given level. + * The setCPLDLampRed function sets the alarm lamp red signal to CPLD to given level. * @details * Inputs : none * Outputs : alarm lamp red signal set to given level. @@ -158,4 +155,6 @@ { CLR_RED(); } -} +} + +/**@}*/ Index: firmware/App/Drivers/CPLD.h =================================================================== diff -u -ra7bf3ca23ea37a61000379facae628a31b3ecc59 -r2fe8834dda9d8f69068c151ff0474d915eef6eb5 --- firmware/App/Drivers/CPLD.h (.../CPLD.h) (revision a7bf3ca23ea37a61000379facae628a31b3ecc59) +++ firmware/App/Drivers/CPLD.h (.../CPLD.h) (revision 2fe8834dda9d8f69068c151ff0474d915eef6eb5) @@ -19,6 +19,14 @@ #define __CPLD_H__ #include "DGCommon.h" + +/** + * @defgroup CPLD CPLD + * @brief CPLD module. + * + * @addtogroup CPLD + * @{ + */ // ********** public function prototypes ********** @@ -30,5 +38,7 @@ void setCPLDLampGreen( PIN_SIGNAL_STATE_T level ); void setCPLDLampBlue( PIN_SIGNAL_STATE_T level ); void setCPLDLampRed( PIN_SIGNAL_STATE_T level ); + +/**@}*/ #endif Index: firmware/App/Drivers/Comm.c =================================================================== diff -u -rdc0d9b087c609e71cacdb7f0395cccf29d749c00 -r2fe8834dda9d8f69068c151ff0474d915eef6eb5 --- firmware/App/Drivers/Comm.c (.../Comm.c) (revision dc0d9b087c609e71cacdb7f0395cccf29d749c00) +++ firmware/App/Drivers/Comm.c (.../Comm.c) (revision 2fe8834dda9d8f69068c151ff0474d915eef6eb5) @@ -22,20 +22,21 @@ #include "Comm.h" // ********** private definitions ********** + +#define SCI_DMA_TRANSMIT_INT 0x00010000 ///< SCI DMA transmit interrupt mask. +#define SCI_DMA_RECEIVE_INT 0x00060000 ///< SCI DMA receive interrupt mask. +#define DMA_CH_STATUS_BIT(ch) ((U32)1U << (ch)) ///< DMA channel status bit mask. -#define DMA_CH_STATUS_BIT(ch) ((U32)1U << (ch)) - // ********** private data ********** -static volatile BOOL canXmitsInProgress = FALSE; +static volatile BOOL canXmitsInProgress = FALSE; ///< Flag to indicates CAN transmit is in progress. #ifdef DEBUG_ENABLED - static volatile BOOL uartXmitsInProgress = FALSE; + static volatile BOOL uartXmitsInProgress = FALSE; ///< Flag to indicates UART transmit is in progress. #endif - -/************************************************************************* + +/*********************************************************************//** * @brief signalCANXmitsInitiated - * The signalCANXmitsInitiated function sets the CAN transmits in \n - * progress flag. + * The signalCANXmitsInitiated function sets the CAN transmits in progress flag. * @details * Inputs : none * Outputs : canXmitsInProgress @@ -45,11 +46,10 @@ { canXmitsInProgress = TRUE; } - -/************************************************************************* + +/*********************************************************************//** * @brief signalCANXmitsCompleted - * The signalCANXmitsCompleted function resets the CAN transmits in \n - * progress flag. + * The signalCANXmitsCompleted function resets the CAN transmits in progress flag. * @details * Inputs : none * Outputs : canXmitsInProgress @@ -59,11 +59,10 @@ { canXmitsInProgress = FALSE; } - -/************************************************************************* + +/*********************************************************************//** * @brief signalSCI1XmitsInitiated - * The signalSCI1XmitsInitiated function sets the SCI1 transmits in \n - * progress flag. + * The signalSCI1XmitsInitiated function sets the SCI1 transmits in progress flag. * @details * Inputs : none * Outputs : uartXmitsInProgress @@ -75,11 +74,10 @@ uartXmitsInProgress = TRUE; } #endif - -/************************************************************************* + +/*********************************************************************//** * @brief signalSCI1XmitsCompleted - * The signalSCI1XmitsCompleted function resets the SCI1 transmits in \n - * progress flag. + * The signalSCI1XmitsCompleted function resets the SCI1 transmits in progress flag. * @details * Inputs : none * Outputs : uartXmitsInProgress @@ -91,10 +89,10 @@ uartXmitsInProgress = FALSE; } #endif - -/************************************************************************* + +/*********************************************************************//** * @brief setSCI1DMAReceiveInterrupt - * The setSCI1DMAReceiveInterrupt function enables DMA receive interrupts \n + * The setSCI1DMAReceiveInterrupt function enables DMA receive interrupts * for the SCI1 peripheral. * @details * Inputs : none @@ -107,10 +105,10 @@ sciREG->SETINT = SCI_DMA_RECEIVE_INT; } #endif - -/************************************************************************* + +/*********************************************************************//** * @brief setSCI1DMATransmitInterrupt - * The setSCI1DMATransmitInterrupt function enables DMA transmit interrupts \n + * The setSCI1DMATransmitInterrupt function enables DMA transmit interrupts * for the SCI1 peripheral. * @details * Inputs : none @@ -123,10 +121,10 @@ sciREG->SETINT = SCI_DMA_TRANSMIT_INT; } #endif - -/************************************************************************* + +/*********************************************************************//** * @brief clearSCI1DMAReceiveInterrupt - * The clearSCI1DMAReceiveInterrupt function disables DMA receive interrupts \n + * The clearSCI1DMAReceiveInterrupt function disables DMA receive interrupts * for the SCI1 peripheral. * @details * Inputs : none @@ -139,10 +137,10 @@ sciREG->CLEARINT = SCI_DMA_RECEIVE_INT; } #endif - -/************************************************************************* + +/*********************************************************************//** * @brief clearSCI1DMATransmitInterrupt - * The clearSCI1DMATransmitInterrupt function disables DMA transmit interrupts \n + * The clearSCI1DMATransmitInterrupt function disables DMA transmit interrupts * for the SCI1 peripheral. * @details * Inputs : none @@ -155,10 +153,10 @@ sciREG->CLEARINT = SCI_DMA_TRANSMIT_INT; } #endif - -/************************************************************************* + +/*********************************************************************//** * @brief setSCI2DMAReceiveInterrupt - * The setSCI2DMAReceiveInterrupt function enables DMA receive interrupts \n + * The setSCI2DMAReceiveInterrupt function enables DMA receive interrupts * for the SCI2 peripheral. * @details * Inputs : none @@ -169,10 +167,10 @@ { scilinREG->SETINT = SCI_DMA_RECEIVE_INT; } - -/************************************************************************* + +/*********************************************************************//** * @brief setSCI2DMATransmitInterrupt - * The setSCI2DMATransmitInterrupt function enables DMA transmit interrupts \n + * The setSCI2DMATransmitInterrupt function enables DMA transmit interrupts * for the SCI2 peripheral. * @details * Inputs : none @@ -183,10 +181,10 @@ { scilinREG->SETINT = SCI_DMA_TRANSMIT_INT; } - -/************************************************************************* + +/*********************************************************************//** * @brief clearSCI2DMAReceiveInterrupt - * The clearSCI2DMAReceiveInterrupt function disables DMA receive interrupts \n + * The clearSCI2DMAReceiveInterrupt function disables DMA receive interrupts * for the SCI2 peripheral. * @details * Inputs : none @@ -197,10 +195,10 @@ { scilinREG->CLEARINT = SCI_DMA_RECEIVE_INT; } - -/************************************************************************* + +/*********************************************************************//** * @brief clearSCI2DMATransmitInterrupt - * The clearSCI2DMATransmitInterrupt function disables DMA transmit interrupts \n + * The clearSCI2DMATransmitInterrupt function disables DMA transmit interrupts * for the SCI2 peripheral. * @details * Inputs : none @@ -211,10 +209,10 @@ { scilinREG->CLEARINT = SCI_DMA_TRANSMIT_INT; } - -/************************************************************************* + +/*********************************************************************//** * @brief clearSCI1CommErrors - * The clearSCI1CommErrors function clears framing and/or overrun error flags \ + * The clearSCI1CommErrors function clears framing and/or overrun error flags * for the SCI1 peripheral. * @details * Inputs : none @@ -228,10 +226,10 @@ sciREG->FLR |= ( SCI_FE_INT | SCI_OE_INT ); } #endif - -/************************************************************************* + +/*********************************************************************//** * @brief clearSCI2CommErrors - * The clearSCI2CommErrors function clears framing and/or overrun error flags \n + * The clearSCI2CommErrors function clears framing and/or overrun error flags * for the SCI2 peripheral. * @details * Inputs : none @@ -243,10 +241,10 @@ sciReceiveByte( scilinREG ); scilinREG->FLR |= ( SCI_FE_INT | SCI_OE_INT ); } - -/************************************************************************* + +/*********************************************************************//** * @brief isSCI1DMATransmitInProgress - * The isSCI2DMATransmitInProgress function determines whether a DMA transmit \n + * The isSCI2DMATransmitInProgress function determines whether a DMA transmit * is in progress on the SCI1 peripheral. * @details * Inputs : status registers @@ -263,10 +261,10 @@ return ( ( TRUE == uartXmitsInProgress ) || ( transmitterBusy == TRUE ) || ( dmaTransmitterBusy == TRUE ) ? TRUE : FALSE ); } #endif - -/************************************************************************* + +/*********************************************************************//** * @brief isSCI2DMATransmitInProgress - * The isSCI2DMATransmitInProgress function determines whether a DMA transmit \n + * The isSCI2DMATransmitInProgress function determines whether a DMA transmit * is in progress on the SCI2 peripheral. * @details * Inputs : status registers @@ -280,10 +278,10 @@ return ( ( transmitterBusy == TRUE ) || ( dmaTransmitterBusy == TRUE ) ? TRUE : FALSE ); } - -/************************************************************************* + +/*********************************************************************//** * @brief isCAN1TransmitInProgress - * The isCAN1TransmitInProgress function determines whether a transmit \n + * The isCAN1TransmitInProgress function determines whether a transmit * is in progress on the CAN1 peripheral. * @details * Inputs : status registers @@ -296,4 +294,5 @@ return result; } - + +/**@}*/ Index: firmware/App/Drivers/Comm.h =================================================================== diff -u -ra7bf3ca23ea37a61000379facae628a31b3ecc59 -r2fe8834dda9d8f69068c151ff0474d915eef6eb5 --- firmware/App/Drivers/Comm.h (.../Comm.h) (revision a7bf3ca23ea37a61000379facae628a31b3ecc59) +++ firmware/App/Drivers/Comm.h (.../Comm.h) (revision 2fe8834dda9d8f69068c151ff0474d915eef6eb5) @@ -19,12 +19,15 @@ #define __COMM_H__ #include "DGCommon.h" + +/** + * @defgroup Comm Comm + * @brief DG communication module. + * + * @addtogroup Comm + * @{ + */ -// ********** public definitions ********** - -#define SCI_DMA_TRANSMIT_INT 0x00010000 -#define SCI_DMA_RECEIVE_INT 0x00060000 - // ********** public function prototypes ********** void signalCANXmitsInitiated( void ); @@ -48,5 +51,7 @@ void clearSCI2DMATransmitInterrupt( void ); void clearSCI2CommErrors( void ); BOOL isSCI2DMATransmitInProgress( void ); + +/**@}*/ #endif 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 Index: firmware/App/Drivers/InternalADC.h =================================================================== diff -u -ra7bf3ca23ea37a61000379facae628a31b3ecc59 -r2fe8834dda9d8f69068c151ff0474d915eef6eb5 --- firmware/App/Drivers/InternalADC.h (.../InternalADC.h) (revision a7bf3ca23ea37a61000379facae628a31b3ecc59) +++ firmware/App/Drivers/InternalADC.h (.../InternalADC.h) (revision 2fe8834dda9d8f69068c151ff0474d915eef6eb5) @@ -30,35 +30,31 @@ // ********** public definitions ********** -#define INT_ADC_BITS_PER_CHANNEL 12 ///< DG internal ADC bits per channel. -#define INT_ADC_FULL_SCALE_BITS 4096 ///< DG internal ADC full scale range. -#define INT_ADC_REF_V 3.0 ///< DG internal ADC reference voltage. - /// Enumeration of DG internal ADC channels. typedef enum Int_ADC_Channels { - INT_ADC_NOT_USED = 0, ///< DG internal ADC channel not used. - INT_ADC_RO_PUMP_INLET_PRESSURE, ///< DG internal ADC RO pump inlet pressure channel. - INT_ADC_RO_PUMP_OUTLET_PRESSURE, ///< DG internal ADC RO pump outlet pressure channel. - INT_ADC_DRAIN_PUMP_OUTLET_PRESSURE, ///< DG internal ADC drain pump outlet pressure channel. - INT_ADC_DRAIN_PUMP_INLET_PRESSURE, ///< DG internal ADC drain pump inlet pressure channel. - INT_ADC_CONCENTRATE_PUMP_1, ///< DG internal ADC concentrate pump #1 channel. - INT_ADC_CONCENTRATE_PUMP_2, ///< DG internal ADC concentrate pump #2 channel. - INT_ADC_PRIMARY_HEATER_24_VOLTS, ///< DG internal ADC primary heater 24 volt supply channel. - INT_ADC_TRIMMER_HEATER_24_VOLTS, ///< DG internal ADC trimmer heater 24 volt supply channel. - INT_ADC_BOARD_THERMISTOR, ///< DG internal ADC DG board thermistor channel. - INT_ADC_FPGA_1_8_VOLTS, ///< DG internal ADC DG FPGA 1.8 volt supply channel. - INT_ADC_FPGA_1_VOLT, ///< DG internal ADC DG FPGA 1 volt supply channel. - INT_ADC_PROCESSOR_1_8_VOLTS, ///< DG internal ADC DG processor 1.8 volt supply channel. - INT_ADC_PROCESSOR_1_2_VOLTS, ///< DG internal ADC DG processor 1.2 volt supply channel. - INT_ADC_SENSORS_3_3_VOLTS, ///< DG internal ADC DG sensors 3.3 volt supply channel. - INT_ADC_SENSORS_5_VOLTS, ///< DG internal ADC DG sensors 5 volt supply channel. - INT_ADC_SENSORS_6_VOLTS, ///< DG internal ADC DG sensors 6 volt supply channel. - INT_ADC_LOGIC_5_VOLTS, ///< DG internal ADC DG logic 5 volt supply channel. - INT_ADC_3_3_VOLTS, ///< DG internal ADC DG 3.3 volt supply channel. - INT_ADC_REFERENCE_VOLTAGE, ///< DG internal ADC reference voltage channel. - INT_ADC_REF_IN1, ///< DG internal ADC ??? channel. TODO - INT_ADC_REF_IN2, ///< DG internal ADC ??? channel. TODO + INT_ADC_NOT_USED = 0, ///< DG internal ADC channel not used + INT_ADC_RO_PUMP_INLET_PRESSURE, ///< DG internal ADC RO pump inlet pressure channel + INT_ADC_RO_PUMP_OUTLET_PRESSURE, ///< DG internal ADC RO pump outlet pressure channel + INT_ADC_DRAIN_PUMP_OUTLET_PRESSURE, ///< DG internal ADC drain pump outlet pressure channel + INT_ADC_DRAIN_PUMP_INLET_PRESSURE, ///< DG internal ADC drain pump inlet pressure channel + INT_ADC_CONCENTRATE_PUMP_1, ///< DG internal ADC concentrate pump number 1 channel + INT_ADC_CONCENTRATE_PUMP_2, ///< DG internal ADC concentrate pump number 2 channel + INT_ADC_PRIMARY_HEATER_24_VOLTS, ///< DG internal ADC primary heater 24 volt supply channel + INT_ADC_TRIMMER_HEATER_24_VOLTS, ///< DG internal ADC trimmer heater 24 volt supply channel + INT_ADC_BOARD_THERMISTOR, ///< DG internal ADC DG board thermistor channel + INT_ADC_FPGA_1_8_VOLTS, ///< DG internal ADC DG FPGA 1.8 volt supply channel + INT_ADC_FPGA_1_VOLT, ///< DG internal ADC DG FPGA 1 volt supply channel + INT_ADC_PROCESSOR_1_8_VOLTS, ///< DG internal ADC DG processor 1.8 volt supply channel + INT_ADC_PROCESSOR_1_2_VOLTS, ///< DG internal ADC DG processor 1.2 volt supply channel + INT_ADC_SENSORS_3_3_VOLTS, ///< DG internal ADC DG sensors 3.3 volt supply channel + INT_ADC_SENSORS_5_VOLTS, ///< DG internal ADC DG sensors 5 volt supply channel + INT_ADC_SENSORS_6_VOLTS, ///< DG internal ADC DG sensors 6 volt supply channel + INT_ADC_LOGIC_5_VOLTS, ///< DG internal ADC DG logic 5 volt supply channel + INT_ADC_3_3_VOLTS, ///< DG internal ADC DG 3.3 volt supply channel + INT_ADC_REFERENCE_VOLTAGE, ///< DG internal ADC reference voltage channel + INT_ADC_REF_IN1, ///< DG internal ADC ??? channel TODO + INT_ADC_REF_IN2, ///< DG internal ADC ??? channel TODO NUM_OF_INT_ADC_CHANNELS ///< Number of DG internal ADC channels } INT_ADC_CHANNEL_T; Index: firmware/App/Drivers/SafetyShutdown.c =================================================================== diff -u -rdc0d9b087c609e71cacdb7f0395cccf29d749c00 -r2fe8834dda9d8f69068c151ff0474d915eef6eb5 --- firmware/App/Drivers/SafetyShutdown.c (.../SafetyShutdown.c) (revision dc0d9b087c609e71cacdb7f0395cccf29d749c00) +++ firmware/App/Drivers/SafetyShutdown.c (.../SafetyShutdown.c) (revision 2fe8834dda9d8f69068c151ff0474d915eef6eb5) @@ -27,22 +27,21 @@ // ********** private definitions ********** -// pin I/O macros -#define SAFETY_SPI1_PORT_MASK 0x00000010 // (CS[4] - re-purposed as output GPIO) -#define SET_SAFETY_SHUTDOWN() {mibspiREG1->PC3 |= SAFETY_SPI1_PORT_MASK;} -#define CLR_SAFETY_SHUTDOWN() {mibspiREG1->PC3 &= ~SAFETY_SPI1_PORT_MASK;} +#define SAFETY_SPI1_PORT_MASK 0x00000010 ///< Safety shutdown GPIO port mask (CS[4] - re-purposed as output GPIO). +#define SET_SAFETY_SHUTDOWN() {mibspiREG1->PC3 |= SAFETY_SPI1_PORT_MASK;} ///< Set safety shutdown GPIO macro. +#define CLR_SAFETY_SHUTDOWN() {mibspiREG1->PC3 &= ~SAFETY_SPI1_PORT_MASK;} ///< Clear safety shutdown GPIO macro. // ********** private definitions ********** -static BOOL safetyShutdownActivated = FALSE; ///< Status of safety shutdown signal. -static BOOL safetyShutdownOverrideResetState = FALSE; ///< Natural status of safety shutdown signal. Used to restore state on override reset. +static BOOL safetyShutdownActivated = FALSE; ///< Status of safety shutdown signal. +static BOOL safetyShutdownOverrideResetState = FALSE; ///< Natural status of safety shutdown signal. Used to restore state on override reset. /*********************************************************************//** * @brief - * The initSafetyShutdown function initializes the Safety Shutdown module. + * The initSafetyShutdown function initializes the safety shutdown module. * @details * Inputs : none - * Outputs : Safety Shutdown module signal output set to initial state. + * Outputs : Safety shutdown module signal output set to initial state. * @return none *************************************************************************/ void initSafetyShutdown( void ) @@ -55,7 +54,7 @@ * The activateSafetyShutdown function activates the safety shutdown signal. * @details * Inputs : none - * Outputs : Safety Shutdown signal output set to active state. + * Outputs : Safety shutdown signal output set to active state. * @return none *************************************************************************/ void activateSafetyShutdown( void ) @@ -65,7 +64,7 @@ /*********************************************************************//** * @brief - * The isSafetyShutdownActivated function returns whether the safety shutdown \n + * The isSafetyShutdownActivated function returns whether the safety shutdown * signal has been activated. * @details * Inputs : none @@ -79,8 +78,7 @@ /*********************************************************************//** * @brief - * The testSetSafetyShutdownOverride function overrides the HD safety \n - * shutdown. + * The testSetSafetyShutdownOverride function overrides the HD safety shutdown. * @details * Inputs : none * Outputs : HD safety shutdown overridden @@ -113,7 +111,7 @@ /*********************************************************************//** * @brief - * The testResetSafetyShutdownOverride function resets the override of the \n + * The testResetSafetyShutdownOverride function resets the override of the * HD safety shutdown. * @details * Inputs : none Index: firmware/App/Drivers/SafetyShutdown.h =================================================================== diff -u -ra7bf3ca23ea37a61000379facae628a31b3ecc59 -r2fe8834dda9d8f69068c151ff0474d915eef6eb5 --- firmware/App/Drivers/SafetyShutdown.h (.../SafetyShutdown.h) (revision a7bf3ca23ea37a61000379facae628a31b3ecc59) +++ firmware/App/Drivers/SafetyShutdown.h (.../SafetyShutdown.h) (revision 2fe8834dda9d8f69068c151ff0474d915eef6eb5) @@ -22,8 +22,7 @@ /** * @defgroup SafetyShutdown SafetyShutdown - * @brief Safety Shutdown module. Allows any module to activate the safety shutdown - * signal. + * @brief Safety Shutdown module. Allows any module to activate the safety shutdown signal. * * @addtogroup SafetyShutdown * @{