Index: firmware/App/Services/FPGA.h =================================================================== diff -u -rf308cc4c35eab630ebbbde405cfe47d049afeafb -r5a36a768d11cc597a36b894c1fb3a5e5590130f1 --- firmware/App/Services/FPGA.h (.../FPGA.h) (revision f308cc4c35eab630ebbbde405cfe47d049afeafb) +++ firmware/App/Services/FPGA.h (.../FPGA.h) (revision 5a36a768d11cc597a36b894c1fb3a5e5590130f1) @@ -8,85 +8,134 @@ * @file FPGA.h * * @author (last) Quang Nguyen -* @date (last) 16-Jul-2020 +* @date (last) 24-Aug-2020 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 * ***************************************************************************/ - -#ifndef __FPGA_H__ -#define __FPGA_H__ - -#include "DGCommon.h" -#include "Interrupts.h" - -// ********** public definitions ********** - -// ********** public function prototypes ********** - -void initFPGA( void ); -void execFPGAIn( void ); -void execFPGAOut( void ); -SELF_TEST_STATUS_T execFPGATest( void ); - -void signalFPGAReceiptCompleted( void ); -void signalFPGATransmitCompleted( void ); - -void setFPGAValveStates( U16 valveStates ); -void setFPGADrainPumpSpeed( U08 drainPumpDAC ); - -void getFPGAVersions( U08 *Id, U08 *Maj, U08 *Min, U08 *Lab ); -U16 getFPGAValveStates( void ); -U16 getFPGAROPumpFlowRate( void ); -U16 getFPGADrainPumpSpeed( void ); -U32 getFPGALoadCellA1( void ); -U32 getFPGALoadCellA2( void ); -U32 getFPGALoadCellB1( void ); -U32 getFPGALoadCellB2( void ); - -U32 getFPGATPiTemp( void ); -U32 getFPGATPoTemp( void ); - -U32 getFPGACD1Temp( void ); -U32 getFPGACD2Temp( void ); - -U08 getFPGARTDErrorCount( void ); -U08 getFPGARTDReadCount( void ); - -U32 getFPGATHDoTemp( void ); - -U08 getFPGATHDoErrorCount( void ); -U08 getFPGATHDoReadCount( void ); - -U32 getFPGATDiTemp( void ); - -U08 getFPGATDiErrorCount( void ); -U08 getFPGATDiReadCount( void ); - -U16 getFPGAPrimaryHeaterTemp( void ); - -U08 getFPGAPrimaryHeaterFlags( void ); -U08 getFPGAPrimaryHeaterReadCount( void ); - -U16 getFPGATrimmerHeaterTemp( void ); - -U08 getFPGATrimmerHeaterFlags( void ); -U08 getFPGATrimmerHeaterReadCount( void ); - -U16 getFPGAPRimaryColdJunctionTemp ( void ); -U16 getFPGATrimmerColdJunctionTemp ( void ); -U08 getFPGACPiReadCount ( void ); -U08 getFPGACPiErrorCount ( void ); -U32 getFPGACPi ( void ); +#ifndef __FPGA_H__ +#define __FPGA_H__ -U08 getFPGACPoReadCount ( void ); -U08 getFPGACPoErrorCount ( void ); -U32 getFPGACPo ( void ); - +#include "DGCommon.h" +#include "Interrupts.h" + +/** + * @defgroup FPGA FPGA + * @brief FPGA service module. Provides functionality to interact with DG FPGA. + * + * @addtogroup FPGA + * @{ + */ + +// ********** public definitions ********** + +// ********** public function prototypes ********** + +void initFPGA( void ); +void execFPGAIn( void ); +void execFPGAOut( void ); +SELF_TEST_STATUS_T execFPGATest( void ); + +void signalFPGAReceiptCompleted( void ); +void signalFPGATransmitCompleted( void ); + +void setFPGAValveStates( U16 valveStates ); +void setFPGADrainPumpSpeed( U08 drainPumpDAC ); +void setFPGACPoProbeType( U16 probeType ); +void setFPGACPiProbeType( U16 probeType ); +void setFPGACP1Control( U08 pumpControl ); +void setFPGACP2Control( U08 pumpControl ); +void setFPGACP1SetStepSpeed( U16 stepSpeed ); +void setFPGACP2SetStepSpeed( U16 stepSpeed ); + +void getFPGAVersions( U08 *Id, U08 *Maj, U08 *Min, U08 *Lab ); +U16 getFPGAValveStates( void ); +U16 getFPGAROPumpFlowRate( void ); +U16 getFPGADrainPumpSpeed( void ); +U32 getFPGALoadCellA1( void ); +U32 getFPGALoadCellA2( void ); +U32 getFPGALoadCellB1( void ); +U32 getFPGALoadCellB2( void ); + +U32 getFPGATPiTemp( void ); +U32 getFPGATPoTemp( void ); + +U32 getFPGACD1Temp( void ); +U32 getFPGACD2Temp( void ); + +U08 getFPGARTDErrorCount( void ); +U08 getFPGARTDReadCount( void ); + +U32 getFPGATRoTemp( void ); + +U08 getFPGATRoErrorCount( void ); +U08 getFPGATRoReadCount( void ); + +U32 getFPGATDiTemp( void ); + +U08 getFPGATDiErrorCount( void ); +U08 getFPGATDiReadCount( void ); + +U16 getFPGAPrimaryHeaterTemp( void ); + +U08 getFPGAPrimaryHeaterFlags( void ); +U08 getFPGAPrimaryHeaterReadCount( void ); + +U16 getFPGATrimmerHeaterTemp( void ); + +U08 getFPGATrimmerHeaterFlags( void ); +U08 getFPGATrimmerHeaterReadCount( void ); + +U16 getFPGAPrimaryColdJunctionTemp( void ); +U16 getFPGATrimmerColdJunctionTemp( void ); + +U08 getFPGACPiFault( void ); +U08 getFPGACPiReadCount( void ); +U08 getFPGACPiErrorCount( void ); +U32 getFPGACPi( void ); + +U08 getFPGACPoFault( void ); +U08 getFPGACPoReadCount( void ); +U08 getFPGACPoErrorCount( void ); +U32 getFPGACPo( void ); + +U08 getFPGAEmstatOutByte( void ); +U08 getFPGAEmstatRxErrCount( void ); +U16 getFPGAEmstatRxFifoCount( void ); + +U16 getFPGACP1HallSensePulseWidth( void ); +U16 getFPGACP2HallSensePulseWidth( void ); + void getFPGAAccelAxes( S16 *x, S16 *y, S16 *z ); void getFPGAAccelMaxes( S16 *xm, S16*ym, S16*zm ); void getFPGAAccelStatus( U16 *cnt, U16 *accelFPGAFaultReg ); -#endif +U16 getFPGAInletFan1TogglePeriod( void ); +U16 getFPGAInletFan2TogglePeriod( void ); +U16 getFPGAInletFan3TogglePeriod( void ); +U16 getFPGAOutletFan1TogglePeriod( void ); +U16 getFPGAOutletFan2TogglePeriod( void ); +U16 getFPGAOutletFan3TogglePeriod( void ); + +U16 getFPGABoardTemp( void ); +U32 getFPGALoadCellsA1B1Temp( void ); +U32 getFPGALoadCellsA2B2Temp( void ); +U32 getFPGATRoInternalTemp( void ); +U32 getFPGATDiInternalTemp( void ); +U32 getFPGACondSnsrInternalTemp( void ); + +U08 getFPGAADC1ReadCount( void ); +U08 getFPGAADC1ErrorCount( void ); + +U08 getFPGAADC2ReadCount( void ); +U08 getFPGAADC2ErrorCount( void ); + +U16 getFPGATimerCount( void ); + +BOOL noFPGAFluidLeakDetected( void); + +/**@}*/ + +#endif