Index: firmware/App/Services/FPGA.c =================================================================== diff -u -r3477dd649f67442ad4bdea810ce5a251c1b0a2bf -r306243570641956ce4e2303380c9c0a02801726d --- firmware/App/Services/FPGA.c (.../FPGA.c) (revision 3477dd649f67442ad4bdea810ce5a251c1b0a2bf) +++ firmware/App/Services/FPGA.c (.../FPGA.c) (revision 306243570641956ce4e2303380c9c0a02801726d) @@ -1332,7 +1332,7 @@ /*********************************************************************//** * @brief - * The setFPGAValvesControlMode function sets the valves control mode + * The setFPGAValvesControlMode function sets the valves control mode. * @details * Inputs : fpgaActuatorSetPoints * Outputs : fpgaActuatorSetPoints @@ -1402,6 +1402,34 @@ /*********************************************************************//** * @brief + * The setFPGAValveDialyzerInletPWM function sets the PWM of VDI in counts. + * @details + * Inputs: fpgaActuatorSetPoints + * Outputs: fpgaActuatorSetPoints + * @param count which is the PWM of VDI in counts + * @return none + *************************************************************************/ +void setFPGAValveDialyzerInletPWM( U16 count ) +{ + fpgaActuatorSetPoints.VDiPWMFixed = count; +} + +/*********************************************************************//** + * @brief + * The getFPGAValveDialyzerInletPWM function reads the current PWM target + * of VDI. + * @details + * Inputs: fpgaSensorReadings + * Outputs: none + * @return current PWM of VDI + *************************************************************************/ +U16 getFPGAValveDialyzerInletPWM( void ) +{ + return fpgaSensorReadings.VDiPWMTarget; +} + +/*********************************************************************//** + * @brief * The setValveDialyzerOutletPosition function sets the position of VDo \n * in counts * @details @@ -1445,6 +1473,34 @@ /*********************************************************************//** * @brief + * The setFPGAValveDialyzerOutletPWM function sets the PWM of VDO in counts. + * @details + * Inputs: fpgaActuatorSetPoints + * Outputs: fpgaActuatorSetPoints + * @param count which is the PWM of VDO in counts + * @return none + *************************************************************************/ +void setFPGAValveDialyzerOutletPWM( U16 count ) +{ + fpgaActuatorSetPoints.VDoPWMFixed = count; +} + +/*********************************************************************//** + * @brief + * The getFPGAValveDialyzerOutletPWM function reads the current PWM target + * of VDO. + * @details + * Inputs: fpgaSensorReadings + * Outputs: none + * @return current PWM of VDO + *************************************************************************/ +U16 getFPGAValveDialyzerOutletPWM( void ) +{ + return fpgaSensorReadings.VDoPWMTarget; +} + +/*********************************************************************//** + * @brief * The setValveBloodVenousPosition function sets the position of VBV \n * in counts * @details @@ -1488,6 +1544,33 @@ /*********************************************************************//** * @brief + * The setFPGAValveBloodVenousPWM function sets the PWM of VBV in counts. + * @details + * Inputs: fpgaActuatorSetPoints + * Outputs: fpgaActuatorSetPoints + * @param count which is the PWM of VBV in counts + * @return none + *************************************************************************/ +void setFPGAValveBloodVenousPWM( U16 count ) +{ + fpgaActuatorSetPoints.VBVPWMFixed = count; +} + +/*********************************************************************//** + * @brief + * The getFPGAValveBloodVenousPWM function returns the PWM of VBV in counts. + * @details + * Inputs: fpgaActuatorSetPoints + * Outputs: none + * @return returns the PWM of VBV in counts + *************************************************************************/ +U16 getFPGAValveBloodVenousPWM( void ) +{ + return fpgaSensorReadings.VBVPWMTarget; +} + +/*********************************************************************//** + * @brief * The setValveBloodArterialPosition function sets the position of VBA \n * in counts * @details @@ -1527,6 +1610,34 @@ U16 getFPGAValveBloodArterialCurrentCounts( void ) { return fpgaSensorReadings.VBACurrent; +} + +/*********************************************************************//** + * @brief + * The setFPGAValveBloodArterialPWM function sets a PWM for VBA in counts. + * @details + * Inputs: fpgaActuatorSetPoints + * Outputs: fpgaActuatorSetPoints + * @param count which is the PWM of VBA in counts + * @return none + *************************************************************************/ +void setFPGAValveBloodArterialPWM( U16 count ) +{ + fpgaActuatorSetPoints.VBAPWMFixed = count; +} + +/*********************************************************************//** + * @brief + * The getFPGAValveBloodArterialPWM function returns the current PWM of + * VBA in counts. + * @details + * Inputs: fpgaSensorReadings + * Outputs: none + * @return current PWM of VBA in counts + *************************************************************************/ +U16 getFPGAValveBloodArterialPWM( void ) +{ + return fpgaSensorReadings.VBAPWMTarget; } /*********************************************************************//**