Index: firmware/App/Services/FpgaDD.c =================================================================== diff -u -r3ea4def3a3a69a00fb96b6089dbd097fa80041de -r837e86dd59014bd075bc39839c8b4b6324288880 --- firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision 3ea4def3a3a69a00fb96b6089dbd097fa80041de) +++ firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision 837e86dd59014bd075bc39839c8b4b6324288880) @@ -230,6 +230,8 @@ U08 fpgaSDPHallStatus; ///< Reg 425. Spent dialysate pump hall sensor direction status U08 fpgaFloater1Status; ///< Reg 426. Floater 1 level sensor status U08 fpgaFloater2Status; ///< Reg 427. Floater 2 level sensor status + U16 fpgaCPAStepCountStatus; ///< Reg 428. Acid concentrate pump revolution down count status + U16 fpgaCPBStepCountStatus; ///< Reg 430. Bicarb concentrate pump revolution down count status } DD_FPGA_SENSORS_T; typedef struct @@ -318,6 +320,8 @@ U16 fpgaVUFPWMLow; ///< Reg 136. VUF PWM low ( Ultra filteration valves ) U16 fpgaVUFPWMPeriod; ///< Reg 138. VUF PWM period U16 fpgaVUFPWMPullin; ///< Reg 140. VUF PWM pull in + U16 fpgaCPARevCount; ///< Reg 142. Acid Concentrate pump revolution count + U16 fpgaCPBRevCount; ///< Reg 144. Bicard Concentrate pump revolution count } FPGA_ACTUATORS_T; #pragma pack(pop) @@ -1285,6 +1289,34 @@ /*********************************************************************//** * @brief + * The setFPGACPARevolutionCount function sets the Acid concentrate + * pump revolution count. + * @details \b Inputs: none + * @details \b Outputs: fpgaCPARevCount + * @param count the number of revolution to be rotated for the pump. + * @return none + *************************************************************************/ +void setFPGACPARevolutionCount( U16 count ) +{ + fpgaActuatorSetPoints.fpgaCPARevCount = count; +} + +/*********************************************************************//** + * @brief + * The setFPGACPBRevolutionCount function sets the Bicarb concentrate + * pump revolution count. + * @details \b Inputs: none + * @details \b Outputs: fpgaCPBRevCount + * @param count the number of revolution to be rotated for the pump. + * @return none + *************************************************************************/ +void setFPGACPBRevolutionCount( U16 count ) +{ + fpgaActuatorSetPoints.fpgaCPBRevCount = count; +} + +/*********************************************************************//** + * @brief * The getFPGAVersions function gets the FPGA version numbers. * @details \b Inputs: fpgaHeader * @details \b Outputs: none @@ -2552,6 +2584,32 @@ /*********************************************************************//** * @brief + * The getFPGACPARevolutionCountStatus function gets the current revolution of + * acid concentrate pump (down counter). + * @details \b Inputs: fpgaCPAStepCountStatus + * @details \b Outputs: none + * @return the current revolution of the acid concentrate pump + *************************************************************************/ +U16 getFPGACPARevolutionCountStatus( void ) +{ + return fpgaSensorReadings.fpgaCPAStepCountStatus; +} + +/*********************************************************************//** + * @brief + * The getFPGACPBRevolutionCountStatus function gets the current revolution of + * bicarb concentrate pump (down counter). + * @details \b Inputs: fpgaCPBStepCountStatus + * @details \b Outputs: none + * @return the current revolution of the bicarb concentrate pump + *************************************************************************/ +U16 getFPGACPBRevolutionCountStatus( void ) +{ + return fpgaSensorReadings.fpgaCPBStepCountStatus; +} + +/*********************************************************************//** + * @brief * The checkFPGAAFEOEFailure function increments the FPGA comm failure * windowed timer if an FE or OE error has occurred and returns whether * or not the number of failures in