/************************************************************************** * * Copyright (c) 2024-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 FpgaDD.h * * @author (last) Vinayakam Mani * @date (last) 08-Aug-2024 * * @author (original) Vinayakam Mani * @date (original) 08-Aug-2024 * ***************************************************************************/ #ifndef __FPGA_DD_H__ #define __FPGA_DD_H__ #include "DDCommon.h" /** * @defgroup FpgaDD FpgaDD * @brief FPGA service unit. Provides functionality to interact with DD FPGA. * * @addtogroup FpgaDD * @{ */ // ********** public definitions ********** // ********** public function prototypes ********** void initFPGADD( void ); void execFPGAClockSpeedTest( void ); SELF_TEST_STATUS_T execFPGATest( void ); void checkFPGACommFailure( void ); BOOL checkFPGAFEOEFailure( void ); void getFPGAVersions( U08 *Id, U08 *Maj, U08 *Min, U08 *Lab ); //Valve void setFPGAValveStates( U16 valveStates ); void setFPGABCValveStates( U08 valveStates ); void setFPGAUFValveStates( U08 valveStates ); U16 getFPGAValveStates( void ); U08 getFPGAValveBCStates( void ); U08 getFPGAValveUFStates( void ); // Conductivity and Temperature Sensor void setFPGACD12Control( U08 control ); void setFPGACD34Control( U08 control ); void setFPGACD12Address( U16 address ); void setFPGACD34Address( U16 address ); void setFPGACD12Data( U32 data ); void setFPGACD34Data( U32 data ); void setFPGACD1Reset( void ); void clearFPGACD1Reset( void ); void setFPGACD1InitEnable( void ); void clearFPGACD1InitEnable( void ); void setFPGACD1WriteEnable( void ); void clearFPGACD1WriteEnable( void ); void setFPGACD1ReadEnable( void ); void clearFPGACD1ReadEnable( void ); void setFPGACD2Reset( void ); void clearFPGACD2Reset( void ); void setFPGACD2InitEnable( void ); void clearFPGACD2InitEnable( void ); void setFPGACD2WriteEnable( void ); void clearFPGACD2WriteEnable( void ); void setFPGACD2ReadEnable( void ); void clearFPGACD2ReadEnable( void ); void setFPGACD3Reset( void ); void clearFPGACD3Reset( void ); void setFPGACD3InitEnable( void ); void clearFPGACD3InitEnable( void ); void setFPGACD3WriteEnable( void ); void clearFPGACD3WriteEnable( void ); void setFPGACD3ReadEnable( void ); void clearFPGACD3ReadEnable( void ); void setFPGACD4Reset( void ); void clearFPGACD4Reset( void ); void setFPGACD4InitEnable( void ); void clearFPGACD4InitEnable( void ); void setFPGACD4WriteEnable( void ); void clearFPGACD4WriteEnable( void ); void setFPGACD4ReadEnable( void ); void clearFPGACD4ReadEnable( void ); U08 getFPGACD1ReadCount( void ); U08 getFPGACD1ErrorCount( void ); U16 getFPGACD1( void ); U16 getFPGACD1Temp( void ); U32 getFPGACD1Data( void ); U08 getFPGACD2ReadCount( void ); U08 getFPGACD2ErrorCount( void ); U16 getFPGACD2( void ); U16 getFPGACD2Temp( void ); U32 getFPGACD2Data( void ); U08 getFPGACD3ReadCount( void ); U08 getFPGACD3ErrorCount( void ); U16 getFPGACD3( void ); U16 getFPGACD3Temp( void ); U32 getFPGACD3Data( void ); U08 getFPGACD4ReadCount( void ); U08 getFPGACD4ErrorCount( void ); U16 getFPGACD4( void ); U16 getFPGACD4Temp( void ); U32 getFPGACD4Data( void ); // Pumps (Concentrate and Gear pumps ) void setFPGAAcidPumpSetStepSpeed( U16 stepSpeed ); void setFPGABicarbSetStepSpeed( U16 stepSpeed ); void setFPGAAcidPumpControl( U08 control ); void setFPGABicarbPumpControl( U08 control ); void setFPGAAcidPumpParkCmd( void ); void setFPGABicarbPumpParkCmd( void ); U08 getFPGAAcidPumpControlStatus( void ); U08 getFPGABicarbPumpControlStatus( void ); U08 getFPGAConcentratePumpsFault( void ); BOOL getFPGAAcidPumpIsParked( void ); BOOL getFPGABicarbPumpIsParked( void ); BOOL getFPGAAcidPumpParkFault( void ); BOOL getFPGABicarbPumpParkFault( void ); U16 getFPGACPAHallSensePulseWidth( void ); U16 getFPGACPBHallSensePulseWidth( void ); void setFPGASpentDialysatePumpSpeed( U16 speed ); void setFPGAFreshDialysatePumpSpeed( U16 speed ); void setFPGASpentDialysatePumpControl( U08 control ); void setFPGAFreshDialysatePumpControl( U08 control ); U08 getFPGASpentDialysatePumpControl( void ); U08 getFPGAFreshDialysatePumpControl( void ); U16 getFPGASpentDialysatePumpSpeed( void ); U16 getFPGAFreshDialysatePumpSpeed( void ); BOOL getFPGAFreshDialysatePumpErrorStatus( void ); BOOL getFPGASpentDialysatePumpErrorStatus( void ); U16 getFPGAFreshDialysatePumpCurrentFeedback( void ); U16 getFPGASpentDialysatePumpCurrentFeedback( void ); U08 getFPGAFreshDialysatePumpHallDirectionStatus( void ); U08 getFPGASpentDialysatePumpHallDirectionStatus( void ); //Pressure sensor U08 getFPGAPnReadCount( void ); U08 getFPGAPnErrorCount( void ); U16 getFPGAPnRawPressure( void ); U16 getFPGAPnRawTemperature( void ); U08 getFPGAPCbReadCount( void ); U08 getFPGAPCbErrorCount( void ); U16 getFPGAPCbRawPressure( void ); U16 getFPGAPCbRawTemperature( void ); U08 getFPGAPDsReadCount( void ); U08 getFPGAPDsErrorCount( void ); U16 getFPGAPDsRawPressure( void ); U16 getFPGAPDsRawTemperature( void ); U08 getFPGAPDfReadCount( void ); U08 getFPGAPDfErrorCount( void ); U16 getFPGAPDfRawPressure( void ); U16 getFPGAPDfRawTemperature( void ); U08 getFPGAPtmReadCount( void ); U08 getFPGAPtmErrorCount( void ); U16 getFPGAPtmRawPressure( void ); U16 getFPGAPtmRawTemperature( void ); //Level sensor U16 getFPGALevelSensor1( void ); U16 getFPGALevelSensor2( void ); //Temperature sensors U32 getFPGAInletHeatExchangerTemp( void ); U32 getFPGAOutletHeatExchangerTemp( void ); U32 getFPGAHydraulicsPrimaryHeaterTemp( void ); U32 getFPGATrimmerHeaterTemp( void ); U08 getFPGARTDReadCount( void ); //Barometric sensor U08 getFPGABaroReadCount( void ); U08 getFPGABaroErrorCount( void ); U16 getFPGABaroMfgInfo( void ); U16 getFPGABaroPressureSensitivity( void ); U16 getFPGABaroPressureOffset( void ); U16 getFPGABaroTempCoeffOfPressSensitvity( void ); U16 getFPGABaroTempCoeffOfPressOffset( void ); U16 getFPGABaroReferenceTemperature( void ); U16 getFPGABaroTempCoeffOfTemperature( void ); U16 getFPGABaroCoeffsCRC( void ); U32 getFPGABaroPressure( void ); U32 getFPGABaroTemperature( void ); //Primary and Trimmer heater void setFPGAPrimaryHeaterPWMControl( U08 control ); void setFPGATrimmerHeaterPWMControl( U08 control ); /**@}*/ #endif