/************************************************************************** * * 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( U16 data ); void setFPGACD34Data( U16 data ); U08 getFPGACD1ReadCount( void ); U08 getFPGACD1ErrorCount( void ); U16 getFPGACD1( void ); U16 getFPGACD1Temp( void ); U16 getFPGACD1Data( void ); U08 getFPGACD2ReadCount( void ); U08 getFPGACD2ErrorCount( void ); U16 getFPGACD2( void ); U16 getFPGACD2Temp( void ); U16 getFPGACD2Data( void ); U08 getFPGACD3ReadCount( void ); U08 getFPGACD3ErrorCount( void ); U16 getFPGACD3( void ); U16 getFPGACD3Temp( void ); U16 getFPGACD3Data( void ); U08 getFPGACD4ReadCount( void ); U08 getFPGACD4ErrorCount( void ); U16 getFPGACD4( void ); U16 getFPGACD4Temp( void ); U16 getFPGACD4Data( void ); // Pumps ( Concentrate and Gear pumps ) void setFPGAAcidPumpSetStepSpeed( U16 stepSpeed ); void setFPGABicarbSetStepSpeed( U16 stepSpeed ); void setFPGADialysateOutPumpSpeed( U16 speed ); void setFPGADialysateOutPumpControl( U08 control ); void setFPGADialysateInPumpControl( U08 control ); void setFPGAAcidPumpControl( U08 control ); void setFPGABicarbPumpControl( U08 control ); U08 getFPGADialysateOutPumpControl( void ); U08 getFPGADialysateInPumpControl( void ); //Pressure sensor U08 getFPGAPnReadCount( void ); U08 getFPGAPnErrorCount( void ); U32 getFPGAPnRawPressure( void ); U32 getFPGAPnRawTemperature( void ); U08 getFPGAPCbReadCount( void ); U08 getFPGAPCbErrorCount( void ); U32 getFPGAPCbRawPressure( void ); U32 getFPGAPCbRawTemperature( void ); U08 getFPGAPDsReadCount( void ); U08 getFPGAPDsErrorCount( void ); U32 getFPGAPDsRawPressure( void ); U32 getFPGAPDsRawTemperature( void ); U08 getFPGAPDfReadCount( void ); U08 getFPGAPDfErrorCount( void ); U32 getFPGAPDfRawPressure( void ); U32 getFPGAPDfRawTemperature( void ); U08 getFPGAPtmReadCount( void ); U08 getFPGAPtmErrorCount( void ); U32 getFPGAPtmRawPressure( void ); U32 getFPGAPtmRawTemperature( void ); //Level sensor U16 getFPGALevelSensor1( void ); U16 getFPGALevelSensor2( void ); /**@}*/ #endif