Index: firmware/App/Services/FpgaDD.c =================================================================== diff -u -r51874695d7cd2547212e86ad7363ff9e515ec38b -r25dfec9cbd60f1fc9f22c00342a1d009c95533ff --- firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision 51874695d7cd2547212e86ad7363ff9e515ec38b) +++ firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision 25dfec9cbd60f1fc9f22c00342a1d009c95533ff) @@ -1,15 +1,15 @@ /************************************************************************** * -* Copyright (c) 2024-2025 Diality Inc. - All Rights Reserved. +* Copyright (c) 2024-2026 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.c * -* @author (last) Michael Garthwaite -* @date (last) 08-Dec-2025 +* @author (last) “rkallala” +* @date (last) 19-Jan-2026 * * @author (original) Vinayakam Mani * @date (original) 26-Aug-2024 @@ -235,7 +235,7 @@ U16 flowRateP7; ///< Reg 704. P7 flow sensor rate. U16 flowTempP7; ///< Reg 706. P7 flow sensor temperature. U16 p12PumpTachCount; ///< Reg 708. P12 pump tachometer counter. - U16 dsPumpTachCount; ///< Reg 710. DSP tachometer counter. + U16 d79SpeedPulseWidth; ///< Reg 710. D79 pusle width feedback. U16 flowIntTempP7; ///< Reg 712. P7 flow sensor internal temperature. U08 valveIOControlReadback; ///< Reg 714. IO Valve control bits read back. U08 valveFPControlReadback; ///< Reg 715. FP Valve control enable read back. @@ -299,7 +299,7 @@ U08 fpgaD42FIFOTx; ///< Reg 48. Blood leak sensor FIFO transmit control U08 fpgaD5HeaterPWMControl; ///< Reg 49. Primary heater PWM control U08 fpgaD45HeaterPWMControl; ///< Reg 50. Trimmer heater PWM control - U08 fpgaNotUsed; ///< Reg 51. Not used + U08 fpgaD79PWMPumpCtl; ///< Reg 51. Rinse pump PWM control U16 fpgaVBCPWMLow; ///< Reg 52. VBC PWM low ( Balancing chamber valves) U16 fpgaVBCPWMPeriod; ///< Reg 54. VBC PWM period U16 fpgaVBCPWMPullIn; ///< Reg 56. VBC PWM pull in @@ -3061,6 +3061,45 @@ /*********************************************************************//** * @brief + * The setFPGAD79RinsePumpControl function sets the control bit of the rinse + * pump to turn it on or off. + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints.fpgaDDSpareValveControl + * @return none + *************************************************************************/ +void setFPGAD79RinsePumpControl( U08 value ) +{ + fpgaActuatorSetPoints.fpgaDDSpareValveControl &= value; +} + +/*********************************************************************//** + * @brief + * The setFPGAD79RinsePumpPWMControl function sets the PWM value of the rinse + * pump to turn it on or off. + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints.fpgaD79PWMPumpCtl + * @return none + *************************************************************************/ +void setFPGAD79RinsePumpPWMControl( U08 value ) +{ + fpgaActuatorSetPoints.fpgaD79PWMPumpCtl = value; +} + +/*********************************************************************//** + * @brief + * The getFPGAD79RinsePumpPulseWidth function returns the 4-wire rinse pump + * pulse width. + * @details \b Inputs: d79SpeedPulseWidth + * @details \b Outputs: none + * @return fpgaSensorReadings.d79SpeedPulseWidth + *************************************************************************/ +U16 getFPGAD79RinsePumpPulseWidth( void ) +{ + return fpgaSensorReadings.d79SpeedPulseWidth; +} + +/*********************************************************************//** + * @brief * The setFPGAFPValveStates function sets the FP valve states with an 8-bit * mask of states - one bit per valve, with a 1 meaning "energized" and a 0 * meaning "de-energized". The bit positions for these bit states are as follows: @@ -3494,6 +3533,19 @@ /*********************************************************************//** * @brief + * The getFPGAFlowP16InternalTemp function gets the P16 flow sensor + * internal temperature. + * @details \b Inputs: fpgaSensorReadings.flowIntTempP16 + * @details \b Outputs: none + * @return P16 internal temperature + *************************************************************************/ +U16 getFPGAFlowP16InternalTemp( void ) +{ + return fpgaSensorReadings.flowIntTempP16; +} + +/*********************************************************************//** + * @brief * The getFPGAFlowP7 function gets the P7 flow rate (in mL/min). * @details \b Inputs: fpgaSensorReadings.flowRateP7 * @details \b Outputs: none @@ -3519,6 +3571,19 @@ /*********************************************************************//** * @brief + * The getFPGAFlowP7InternalTemp function gets the P7 flow sensor + * internal temperature. + * @details \b Inputs: fpgaSensorReadings.flowIntTempP7 + * @details \b Outputs: none + * @return P7 internal temperature + *************************************************************************/ +U16 getFPGAFlowP7InternalTemp( void ) +{ + return fpgaSensorReadings.flowIntTempP7; +} + +/*********************************************************************//** + * @brief * The setFPGAP9Control function sets the FPGA P9 sensor control register * to perform a given action. * bit 4..7: unused