/************************************************************************** * * Copyright (c) 2019-2024 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) Sean Nash * @date (last) 05-Sep-2023 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 * ***************************************************************************/ #ifndef __FPGA_TD_H__ #define __FPGA_TD_H__ #include "TDCommon.h" #include "Interrupts.h" /** * @defgroup FpgaTD FpgaTD * @brief FPGA service unit for TD firmware. * The FPGA unit contains get/set functions for the TD FPGA registers. * * @addtogroup FpgaTD * @{ */ // ********** public definitions ********** // ********** public function prototypes ********** void initFpgaTD( void ); SELF_TEST_STATUS_T execFPGATest( void ); void execFPGAClockSpeedTest( void ); void checkFPGACommFailure( void ); void checkFPGAFEOEFailure( void ); U16 getFPGATimerCount( void ); void getFPGAVersions( U08 *Id, U08 *Maj, U08 *Min, U08 *Lab ); U16 getFPGATemperature( void ); F32 getFPGAVcc( void ); F32 getFPGAVccAux( void ); F32 getFPGAVpvn( void ); void setAlarmAudioState( U32 state, U32 volumeLevel, U32 volumeDivider ); U16 getFPGABloodPumpHallSensorCount( void ); U08 getFPGABloodPumpHallSensorStatus( void ); U32 getPBAPressure( void ); U32 getPBATemperature( void ); U08 getPBAReadCounter( void ); U08 getPBAErrorCounter( void ); U32 getPBOPressure( void ); U32 getPBOTemperature( void ); U08 getPBOReadCounter( void ); U08 getPBOErrorCounter( void ); F32 getFPGABackupAlarmAudioCurrent( void ); void getFPGAAirTrapLevels( BOOL *airAtLower, BOOL *airAtUpper ); void setFPGAValvesControlMode( U16 bits ); BOOL noFPGAFluidLeakDetected( void ); BOOL ADVBubbleDetected( void ); void setFPGAVenousBubbleSelfTest( void ); void clearFPGAVenousBubbleSelfTest( void ); void setVBVPosition( S16 setPoint ); S16 getVBVPosition( void ); U16 getVBVStatus( void ); U16 getFPGAValveBloodVenousCurrentCounts( void ); void setVBAPosition( S16 setPoint ); S16 getVBAPosition( void ); U16 getVBAStatus( void ); U16 getFPGAValveBloodArterialCurrentCounts( void ); U16 getFPGABoardTemperature( void ); U32 getFPGAPBAADCTemperature( void ); U16 getFPGAInletFan1TogglePeriod( void ); U16 getFPGAFrontDoorStatus( void ); /**@}*/ #endif