Index: firmware/App/Services/FPGA.c =================================================================== diff -u -r7e2931d9a468ca3b6e1f2bb88ef0910960dfdb29 -rfeb93744f73bc0a3d58841bb02bd05c38357f35d --- firmware/App/Services/FPGA.c (.../FPGA.c) (revision 7e2931d9a468ca3b6e1f2bb88ef0910960dfdb29) +++ firmware/App/Services/FPGA.c (.../FPGA.c) (revision feb93744f73bc0a3d58841bb02bd05c38357f35d) @@ -165,6 +165,10 @@ U16 fpgaEmstatRxFifoCount; ///< Reg 386. Number of bytes in the Emstat Rx FIFO buffer U16 fpgaCP1HallSense; ///< Reg 388. Concentrate pump CP1 hall sensor pulse width. U16 fpgaCP2HallSense; ///< Reg 390. Concentrate pump CP2 hall sensor pulse width. + + U08 fpgaGPIOReg; ///< Reg 392. FGPA GPIO register + U08 fpgaDummyByte2Addr; ///< Reg 393. Dummy byte address to maintain an even addressing scheme + U16 fpgaADCTemp; ///< Reg 394. Internal FPGA die temperature ADC } DG_FPGA_SENSORS_T; typedef struct @@ -579,7 +583,7 @@ fpgaCommRetryCount++; } - // shouldn't be any data received at this time + // There should not be any data received at this time consumeUnexpectedData(); return result; @@ -686,7 +690,7 @@ fpgaCommRetryCount++; } - // shouldn't be any data received at this time + // There should not be any data received at this time consumeUnexpectedData(); return result; @@ -1581,4 +1585,198 @@ return fpgaSensorReadings.fpgaCP2HallSense; } +/*********************************************************************//** + * @brief + * The getFPGAFan1Pulse function gets inlet fan 1 pulse value. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return inlet fan 1 pulse value + *************************************************************************/ +U16 getFPGAInletFan1TogglePeriod( void ) +{ + return fpgaSensorReadings.fpgaFan1Pulse; +} + +/*********************************************************************//** + * @brief + * The getFPGAFan2Pulse function gets inlet fan 2 pulse value. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return inlet fan 2 pulse value + *************************************************************************/ +U16 getFPGAInletFan2TogglePeriod( void ) +{ + return fpgaSensorReadings.fpgaFan2Pulse; +} + +/*********************************************************************//** + * @brief + * The getFPGAInletFan3Pulse function gets inlet fan 3 pulse value. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return inlet fan 3 pulse value + *************************************************************************/ +U16 getFPGAInletFan3TogglePeriod( void ) +{ + return 0; +} + +/*********************************************************************//** + * @brief + * The getFPGAOutletFan1Pulse function gets outlet fan 1 pulse value. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return outlet fan 1 pulse value + *************************************************************************/ +U16 getFPGAOutletFan1TogglePeriod( void ) +{ + return 0; +} + +/*********************************************************************//** + * @brief + * The getFPGAOutletFan2Pulse function gets outlet fan 2 pulse value. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return outlet fan 2 pulse value + *************************************************************************/ +U16 getFPGAOutletFan2TogglePeriod( void ) +{ + return 0; +} + +/*********************************************************************//** + * @brief + * The getFPGAOutletFan3Pulse function gets outlet fan 3 pulse value. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return outlet fan 3 pulse value + *************************************************************************/ +U16 getFPGAOutletFan3TogglePeriod( void ) +{ + return 0; +} + +/*********************************************************************//** + * @brief + * The getFPGABoardTemp function gets FPGA board temperature reading. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return FPGA board temperature reading in ADC counts + *************************************************************************/ +U16 getFPGABoardTemp( void ) +{ + return fpgaSensorReadings.fpgaADCTemp; +} + +/*********************************************************************//** + * @brief + * The getFPGAA1B1Temp function gets load cells A1/B1 temperature reading. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return load cells A1/B1 temperature reading in ADC counts + *************************************************************************/ +U32 getFPGALoadCellsA1B1Temp( void ) +{ + return fpgaSensorReadings.fpgaADC1Temp; +} + +/*********************************************************************//** + * @brief + * The getFPGAA1B1Temp function gets load cells A2/B2 temperature reading. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return load cells A2/B2 temperature reading in ADC counts + *************************************************************************/ +U32 getFPGALoadCellsA2B2Temp( void ) +{ + return fpgaSensorReadings.fpgaADC2Temp; +} + +/*********************************************************************//** + * @brief + * The getFPGATHDoInternalTemp function gets THDo internal temperature reading. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return THDo internal temperature reading in ADC counts + *************************************************************************/ +U32 getFPGATHDoInternalTemp( void ) +{ + return fpgaSensorReadings.fpgaTHDoTemp; +} + +/*********************************************************************//** + * @brief + * The getFPGATDiInternalTemp function gets TDi internal temperature reading. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return TDi internal temperature reading in ADC counts + *************************************************************************/ +U32 getFPGATDiInternalTemp( void ) +{ + return fpgaSensorReadings.fpgaTDiTemp; +} + +/*********************************************************************//** + * @brief + * The getFPGAConductivitySnsrInternalTemp function gets conductivity sensor + * internal temperature reading. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return conductivity sensor temperature reading in ADC counts + *************************************************************************/ +U32 getFPGACondSnsrInternalTemp( void ) +{ + return fpgaSensorReadings.fpgaRTDTemp; +} + +/*********************************************************************//** + * @brief + * The getFPGAADC1ReadCount function gets the FPGA ADC1 read count. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return FPGA ADC1 read count + *************************************************************************/ +U08 getFPGAADC1ReadCount( void ) +{ + return fpgaSensorReadings.fpgaADC1ReadCnt; +} + +/*********************************************************************//** + * @brief + * The getFPGAADC1ErrorCount function gets the FPGA ADC1 error count. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return FPGA ADC1 error count + *************************************************************************/ +U08 getFPGAADC1ErrorCount( void ) +{ + return fpgaSensorReadings.fpgaADC1ErrorCnt; +} + +/*********************************************************************//** + * @brief + * The getFPGAADC2ReadCount function gets the FPGA ADC2 read count. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return FPGA ADC2 read count + *************************************************************************/ +U08 getFPGAADC2ReadCount( void ) +{ + return fpgaSensorReadings.fpgaADC2ReadCnt; +} + +/*********************************************************************//** + * @brief + * The getFPGAADC2ErrorCount function gets the FPGA ADC2 error count. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return FPGA ADC2 error count + *************************************************************************/ +U08 getFPGAADC2ErrorCount( void ) +{ + return fpgaSensorReadings.fpgaADC2ErrorCnt; +} + /**@}*/ +