Index: firmware/App/Services/FpgaTD.h =================================================================== diff -u -r3518e8a088c32e75c0c8960d5e629a7401095feb -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Services/FpgaTD.h (.../FpgaTD.h) (revision 3518e8a088c32e75c0c8960d5e629a7401095feb) +++ firmware/App/Services/FpgaTD.h (.../FpgaTD.h) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -8,20 +8,18 @@ * @file FPGA.h * * @author (last) Sean Nash -* @date (last) 05-Sep-2023 +* @date (last) 30-Jul-2024 * -* @author (original) Dara Navaei -* @date (original) 05-Nov-2019 +* @author (original) Sean Nash +* @date (original) 30-Jul-2024 * ***************************************************************************/ #ifndef __FPGA_TD_H__ #define __FPGA_TD_H__ #include "TDCommon.h" -#include "Interrupts.h" - /** * @defgroup FpgaTD FpgaTD * @brief FPGA service unit for TD firmware. @@ -33,6 +31,12 @@ // ********** public definitions ********** +#define FPGA_PINCH_VALVES_1_32_STEP 0x03 ///< Bit mask for configuring pinch valve for 1/32 step. +#define FPGA_PINCH_VALVES_REVERSE 0x08 ///< Bit mask for configuring pinch valve for reverse direction. +#define FPGA_PINCH_VALVES_DISABLE 0x10 ///< Bit mask for configuring pinch valve to be disabled. +#define FPGA_PINCH_VALVES_NOT_RESET 0x20 ///< Bit mask for configuring pinch valve to not be in reset. +#define FPGA_PINCH_VALVES_NOT_SLEEP 0x40 ///< Bit mask for configuring pinch valve to not be in sleep mode. + // ********** public function prototypes ********** void initFpgaTD( void ); @@ -50,67 +54,56 @@ void setAlarmAudioState( U32 state, U32 volumeLevel, U32 volumeDivider ); -U16 getFPGABloodPumpHallSensorCount( void ); -U08 getFPGABloodPumpHallSensorStatus( void ); +void setH4Enabled( BOOL enable ); +void setH4Direction( MOTOR_DIR_T dir ); +void homeH4( void ); +void resetH4HomeRequest( void ); +void setH4SetSpeed( U16 rpm ); +U16 getH4Period( void ); -U32 getFPGAArterialPressure( void ); -U08 getFPGAArterialPressureReadCounter( void ); -U08 getFPGAArterialPressureErrorCounter( void ); +U16 getBloodPumpHallSensorCount( void ); +U08 getBloodPumpHallSensorStatus( void ); -U16 getFPGADVTArterialPressure( void ); -U16 getFPGADVTArterialTemperature( void ); -U08 getFPGADVTArterialPressureReadCounter( void ); -U08 getFPGATDVTArterialPressureErrorCounter( void ); +U16 getH2Pressure( void ); +S16 getH2Temperature( void ); +U08 getH2ReadCounter( void ); +U08 getH2ErrorCounter( void ); -U16 getFPGAVenousPressure( void ); -U16 getFPGAVenousPressureTemperature( void ); -U08 getFPGAVenousPressureReadCounter( void ); -U08 getFPGAVenousPressureErrorCounter( void ); +U16 getH14Pressure( void ); +S16 getH14Temperature( void ); +U08 getH14ReadCounter( void ); +U08 getH14ErrorCounter( 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 ); +BOOL H18BubbleDetected( void ); void setFPGAVenousBubbleSelfTest( void ); void clearFPGAVenousBubbleSelfTest( void ); -void setFPGAValveBloodVenousPosition( S16 setPoint ); -S16 getFPGAValveBloodVenousPosition( void ); -U16 getFPGAValveBloodVenousCurrentCounts( void ); +void setH13ValveState( OPN_CLS_STATE_T state ); -void setFPGAValveBloodArterialPosition( S16 setPoint ); -S16 getFPGAValveBloodArterialPosition( void ); -U16 getFPGAValveBloodArterialCurrentCounts( void ); +void setH19Control( U08 controlBits ); +U08 getH19Control( void ); +void setH19Position( U16 setPoint ); +S16 getH19EncoderPosition( void ); +S16 getH19CmdPosition( void ); +U16 getH19Status( void ); -U16 getFPGABoardTemperature( void ); -U32 getFPGAPBAADCTemperature( void ); -U16 getFPGAInletFan1TogglePeriod( void ); +void setH1Control( U08 controlBits ); +U08 getH1Control( void ); +void setH1Position( U16 setPoint ); +S16 getH1EncoderPosition( void ); +S16 getH1CmdPosition( void ); +U16 getH1Status( void ); -U16 getFPGAFrontDoorStatus( void ); +U16 getFPGABoardTemperature( void ); +U32 getFPGAPBAADCTemperature( void ); +U16 getFPGAInletFan1TogglePeriod( void ); -/**@}*/ - -#endif +BOOL getFPGAFrontDoorClosedStatus( void ); + +/**@}*/ + +#endif