Index: firmware/App/Services/FPGA.h =================================================================== diff -u -rb01c6571b1ffade6de3e0bf6890de918f4d8b47d -r24b2fe72608344e67ef37234085d15ad5e4fcc37 --- firmware/App/Services/FPGA.h (.../FPGA.h) (revision b01c6571b1ffade6de3e0bf6890de918f4d8b47d) +++ firmware/App/Services/FPGA.h (.../FPGA.h) (revision 24b2fe72608344e67ef37234085d15ad5e4fcc37) @@ -1,17 +1,17 @@ /************************************************************************** * -* Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. +* Copyright (c) 2019-2022 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 +* @file FPGA.h * -* @author (last) Sean Nash -* @date (last) 14-Oct-2020 +* @author (last) Sean Nash +* @date (last) 12-Nov-2021 * -* @author (original) Dara Navaei -* @date (original) 05-Nov-2019 +* @author (original) Dara Navaei +* @date (original) 05-Nov-2019 * ***************************************************************************/ @@ -46,22 +46,28 @@ void execFPGAIn( void ); void execFPGAOut( void ); SELF_TEST_STATUS_T execFPGATest( void ); +void execFPGAClockSpeedTest( void ); void signalFPGAReceiptCompleted( void ); void signalFPGATransmitCompleted( 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( ALARM_PRIORITY_T state, U32 volumeLevel ); +void setAlarmAudioState( U32 state, U32 volumeLevel, U32 volumeDivider ); F32 getFPGABloodFlowSignalStrength( void ); F32 getFPGADialysateFlowSignalStrength( void ); -F32 getFPGABloodFlow( void ); F32 getFPGADialysateFlow( void ); - -U08 getFPGABloodFlowMeterStatus( void ); U08 getFPGADialysateFlowMeterStatus( void ); +U08 getFPGADialysateFlowFastPacketReadCounter( void ); +U08 getFPGADialysateFlowSlowPacketReadCounter( void ); +U08 getFPGADialysateFlowStatusPacketReadCounter( void ); +U08 getFPGADialysateFlowErrorCounter( void ); U16 getFPGABloodPumpHallSensorCount( void ); U08 getFPGABloodPumpHallSensorStatus( void ); @@ -71,10 +77,14 @@ U08 getFPGADialOutPumpHallSensorStatus( void ); U32 getFPGAArterialPressure( void ); +U08 getFPGAArterialPressureReadCounter( void ); +U08 getFPGAArterialPressureErrorCounter( void ); U16 getFPGAVenousPressure( void ); +U16 getFPGAVenousPressureTemperature( void ); +U08 getFPGAVenousPressureReadCounter( void ); U16 getFPGABloodPumpOcclusion( void ); -U16 getFPGADialInPumpOcclusion( void ); -U16 getFPGADialOutPumpOcclusion( void ); +U08 getFPGABloodPumpOcclusionReadCounter( void ); +U08 getFPGABloodPumpOcclusionErrorCounter( void ); void setFPGASyringePumpControlFlags( U08 bitFlags ); void setFPGASyringePumpADCandDACControlFlags( U08 bitFlags ); @@ -90,16 +100,17 @@ U16 getFPGASyringePumpADCChannel2( void ); U16 getFPGASyringePumpADCChannel3( void ); +U16 getFPGATimerCount( void ); + void getFPGAAccelAxes( S16 *x, S16 *y, S16 *z ); void getFPGAAccelMaxes( S16 *xm, S16*ym, S16*zm ); void getFPGAAccelStatus( U16 *cnt, U16 *accelFPGAFaultReg ); +F32 getFPGABackupAlarmAudioCurrent( void ); + void getFPGAAirTrapLevels( BOOL *airAtLower, BOOL *airAtUpper ); -BOOL getFPGAArterialAirBubbleStatus( void ); -BOOL getFPGAVenousAirBubbleStatus( void ); void setFPGASensorTest( U08 sensorTest ); -BOOL getFPGABloodLeakDetectorStatus( void ); OPN_CLS_STATE_T getFPGADoorState( void ); @@ -108,6 +119,17 @@ BOOL noFPGAFluidLeakDetected( void ); +BOOL noFPGABloodLeakDetected( void ); +BOOL FPGABloodLeakZeroDetected( void ); +void setFPGABloodLeakZero( void ); +void clearFPGABloodLeakZero( void ); +void setFPGABloodLeakSelfTest( void ); +void clearFPGABloodLeakSelfTest( void ); + +BOOL noFPGABubbleDetected( U32 bubble ); +void setFPGABubbleSelfTest( U32 bubble ); +void clearFPGABubbleSelfTest( U32 bubble ); + void setFPGAValveDialyzerInletPosition( S16 setPoint ); S16 getFPGAValveDialyzerInletPosition( void ); U16 getFPGAValveDialyzerInletCurrentCounts( void ); @@ -123,7 +145,13 @@ void setFPGAValveBloodArterialPosition( S16 setPoint ); S16 getFPGAValveBloodArterialPosition( void ); U16 getFPGAValveBloodArterialCurrentCounts( void ); +U16 getFPGABoardTemperature( void ); +U32 getFPGAPBAADCTemperature( void ); +U16 getFPGAInletFan1TogglePeriod( void ); +U16 getFPGAFrontDoorStatus( void ); +U16 getFPGAPumpTrackSwitchStatus( void ); + // The PWM functions are only used during debugging #ifdef DEBUG_ENABLED void setFPGAValveDialyzerInletPWM( U16 count );