/************************************************************************** * * 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 getFPGAArterialPressure( void ); U08 getFPGAArterialPressureReadCounter( void ); U08 getFPGAArterialPressureErrorCounter( void ); U16 getFPGADVTArterialPressure( void ); U16 getFPGADVTArterialTemperature( void ); U08 getFPGADVTArterialPressureReadCounter( void ); U08 getFPGATDVTArterialPressureErrorCounter( void ); U16 getFPGAVenousPressure( void ); U16 getFPGAVenousPressureTemperature( void ); U08 getFPGAVenousPressureReadCounter( void ); U08 getFPGAVenousPressureErrorCounter( void ); void setFPGASyringePumpControlFlags( U08 bitFlags ); void setFPGASyringePumpADCandDACControlFlags( U08 bitFlags ); void setFPGASyringePumpDACOutputLevel( U16 counts ); void setFPGASyringePumpStepToggleTime( U32 microSeconds ); U08 getFPGASyringePumpStatus( void ); U08 getFPGASyringePumpADCReadCounter( void ); U08 getFPGASyringePumpADCandDACStatus( void ); U08 getFPGASyringePumpEncoderStatus( void ); U32 getFPGASyringePumpEncoderPosition( void ); U16 getFPGASyringePumpADCChannel0( void ); U16 getFPGASyringePumpADCChannel1( void ); U16 getFPGASyringePumpADCChannel2( void ); U16 getFPGASyringePumpADCChannel3( void ); U08 getFPGASyringePumpDACStatus( void ); U16 getFPGASyringePumpDACSetting( void ); U16 getFPGASyringePumpDACStoredSetting( void ); F32 getFPGABackupAlarmAudioCurrent( void ); void getFPGAAirTrapLevels( BOOL *airAtLower, BOOL *airAtUpper ); void setFPGAValvesControlMode( U16 bits ); U16 getFPGAValvesStatus( void ); BOOL noFPGAFluidLeakDetected( void ); BOOL noFPGAVenousBubbleDetected( void ); void setFPGAVenousBubbleSelfTest( void ); void clearFPGAVenousBubbleSelfTest( void ); void setFPGAValveBloodVenousPosition( S16 setPoint ); S16 getFPGAValveBloodVenousPosition( void ); U16 getFPGAValveBloodVenousCurrentCounts( void ); void setFPGAValveBloodArterialPosition( S16 setPoint ); S16 getFPGAValveBloodArterialPosition( void ); U16 getFPGAValveBloodArterialCurrentCounts( void ); U16 getFPGABoardTemperature( void ); U32 getFPGAPBAADCTemperature( void ); U16 getFPGAInletFan1TogglePeriod( void ); U16 getFPGAFrontDoorStatus( void ); /**@}*/ #endif