/************************************************************************** * * 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 FpgaRO.h * * @author (last) Sean Nash * @date (last) 09-Nov-2024 * * @author (original) Sean Nash * @date (original) 09-Nov-2024 * ***************************************************************************/ #ifndef __FPGA_RO_H__ #define __FPGA_RO_H__ #include "FPCommon.h" #include "FPGA.h" /** * @defgroup FpgaRO FpgaRO * @brief FPGA service unit for RO firmware. * The FPGA unit contains get/set functions for the RO FPGA registers. * * @addtogroup FpgaRO * @{ */ // ********** public definitions ********** // ********** public function prototypes ********** void initFPGARO( void ); SELF_TEST_STATUS_T execFPGATest( void ); void getFPGAVersions( U08 *Id, U08 *Maj, U08 *Min, U08 *Lab ); void checkFPGACommFailure( void ); BOOL checkFPGAFEOEFailure( void ); void setFPGAValveStates( U16 valveStates ); U16 getFPGAValveStates( void ); void setFPGAValvePWMEnable( U16 valvePWMStates ); U16 getFPGAValvePWMEnable( void ); void setFPGAValvePWMPullIn( U16 valvePWMPullIn ); void setFPGAValvePWMLow( U16 valvePWMLow ); void setFPGAValvePWMPeriod( U16 valvePWMPeriod ); void setFPGAP12PumpEnable( BOOL enable ); void setFPGAP12PumpPWM( U16 pwm ); U16 getFPGAP12PumpPWM( void ); U16 getFPGAP12PumpTachCount( void ); void setFPGAP24Enabled( BOOL enable ); void setFPGAP24PWM( U16 pwm ); S16 getFPGAM1RawPressure( void ); S16 getFPGAM1RawTemperature( void ); U08 getFPGAM1ReadCount( void ); S16 getFPGAM3RawPressure( void ); S16 getFPGAM3RawTemperature( void ); U08 getFPGAM3ReadCount( void ); S16 getFPGAP8RawPressure( void ); S16 getFPGAP8RawTemperature( void ); U08 getFPGAP8ReadCount( void ); S16 getFPGAP13RawPressure( void ); S16 getFPGAP13RawTemperature( void ); U08 getFPGAP13ReadCount( void ); S16 getFPGAP17RawPressure( void ); S16 getFPGAP17RawTemperature( void ); U08 getFPGAP17ReadCount( void ); S16 getFPGAX1RawPressure( void ); S16 getFPGAX1RawTemperature( void ); U08 getFPGAX1ReadCount( void ); S16 getFPGAX2RawPressure( void ); S16 getFPGAX2RawTemperature( void ); U08 getFPGAX2ReadCount( void ); S16 getFPGAX3RawPressure( void ); S16 getFPGAX3RawTemperature( void ); U08 getFPGAX3ReadCount( void ); S16 getFPGAX4RawPressure( void ); S16 getFPGAX4RawTemperature( void ); U08 getFPGAX4ReadCount( void ); S16 getFPGAX5RawPressure( void ); S16 getFPGAX5RawTemperature( void ); U08 getFPGAX5ReadCount( void ); U32 getFPGAP23Temperature( void ); U32 getFPGAP22Temperature( void ); U08 getFPGAP25FloaterState( void ); U16 getFPGAFlowP16( void ); U16 getFPGAFlowP16Temp( void ); U16 getFPGAFlowP7( void ); U16 getFPGAFlowP7Temp( void ); void setFPGAP9Control( U08 control ); void setFPGAP9Address( U16 address ); void setFPGAP9Data( U32 data ); void setFPGAP18Control( U08 control ); void setFPGAP18Address( U16 address ); void setFPGAP18Data( U32 data ); void setFPGAP9Reset( void ); void clearFPGAP9Reset( void ); void setFPGAP9InitEnable( void ); void clearFPGAP9InitEnable( void ); void setFPGAP9WriteEnable( void ); void clearFPGAP9WriteEnable( void ); void setFPGAP9ReadEnable( void ); void clearFPGAP9ReadEnable( void ); void setFPGAP18Reset( void ); void clearFPGAP18Reset( void ); void setFPGAP18InitEnable( void ); void clearFPGAP18InitEnable( void ); void setFPGAP18WriteEnable( void ); void clearFPGAP18WriteEnable( void ); void setFPGAP18ReadEnable( void ); void clearFPGAP18ReadEnable( void ); U08 getFPGAP9ReadCount( void ); U08 getFPGAP9ErrorCount( void ); U16 getFPGAP9Conductivity( void ); U16 getFPGAP9Temperature( void ); U32 getFPGAP9Data( void ); U08 getFPGAP18ReadCount( void ); U08 getFPGAP18ErrorCount( void ); U16 getFPGAP18Conductivity( void ); U16 getFPGAP18Temperature( void ); U32 getFPGAP18Data( void ); void setFPGAP40PumpEnable( BOOL enable ); void setFPGAP40PumpPWM( U16 pwm ); U16 getFPGAP40PumpPWM( void ); U16 getFPGAP40PumpTachCount( void ); /**@}*/ #endif