/************************************************************************** * * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * @file FPGA.h * * @author (last) Quang Nguyen * @date (last) 16-Jul-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 ); U08 getFPGACPoReadCount ( void ); U08 getFPGACPoErrorCount ( void ); U32 getFPGACPo ( void ); void getFPGAAccelAxes( S16 *x, S16 *y, S16 *z ); void getFPGAAccelMaxes( S16 *xm, S16*ym, S16*zm ); void getFPGAAccelStatus( U16 *cnt, U16 *accelFPGAFaultReg ); #endif