Index: firmware/App/Services/FPGA.c =================================================================== diff -u -r216bd924f989182e648ee5f33f4c91c43ac438ac -rc48a99d2d1c852adcc986253b6c420a90dab7bfe --- firmware/App/Services/FPGA.c (.../FPGA.c) (revision 216bd924f989182e648ee5f33f4c91c43ac438ac) +++ firmware/App/Services/FPGA.c (.../FPGA.c) (revision c48a99d2d1c852adcc986253b6c420a90dab7bfe) @@ -89,17 +89,17 @@ U32 fpgaLCB2; U32 fpgaADC2Temp; - U32 fpgaCD1; - U32 fpgaCD2; + U32 fpgaCD1Temp; // Conductivity sensor 1 in the mixing area + U32 fpgaCD2Temp; U32 fpgaTPiTemp; U32 fpgaTPoTemp; U32 fpgaRTDTemp; - U32 fpgaTHDo; + U32 fpgaTHDo; // TRo U32 fpgaTHDoTemp; U32 fpgaTDi; - U32 fpgaTDiTemp; + U32 fpgaTDiTemp; // Dialysate inlet sensor U32 fpgaCPoEc; U32 fpgaCPoTds; @@ -144,12 +144,12 @@ U16 fpgaValveStates; U08 fpgaID; U08 fpgaRev; - U08 fpgaADC1Control; - U08 fpgaDiag; - U08 fpgaADC2Control; - U08 fpgaRTDControl; - U08 fpgaTHDoControl; - U08 fpgaTDiControl; + //U08 fpgaADC1Control; + //U08 fpgaDiag; + //U08 fpgaADC2Control; + //U08 fpgaRTDControl; + //U08 fpgaTHDoControl; + //U08 fpgaTDiControl; } FPGA_ACTUATORS_T; #pragma pack(pop) @@ -1090,7 +1090,7 @@ *************************************************************************/ U32 getFPGATPiTemp( void ) { - return ( fpgaSensorReadings.fpgaTPiTemp & MASK_OFF_U32_MSB ); + return fpgaSensorReadings.fpgaTPiTemp; } /*********************************************************************//** @@ -1105,11 +1105,160 @@ *************************************************************************/ U32 getFPGATPoTemp( void ) { - return ( fpgaSensorReadings.fpgaTPoTemp & MASK_OFF_U32_MSB ); + return fpgaSensorReadings.fpgaTPoTemp; } /*********************************************************************//** * @brief + * The getFPGATD1Temp function gets the latest conductivity sensor 1 \n + * temperature reading in ADC. + * @details + * Inputs : fpgaSensorReadings.fpgaCD1Temp + * Outputs : none + * @param none + * @return last conductivity sensor 1 outlet temperature reading + *************************************************************************/ +U32 getFPGACD1Temp( void ) +{ + return fpgaSensorReadings.fpgaCD1Temp; +} + +/*********************************************************************//** + * @brief + * The getFPGATD2Temp function gets the latest conductivity sensor 2 \n + * temperature reading in ADC. + * @details + * Inputs : fpgaSensorReadings.fpgaCD2Temp + * Outputs : none + * @param none + * @return last conductivity sensor 2 outlet temperature reading + *************************************************************************/ +U32 getFPGACD2Temp( void ) +{ + return fpgaSensorReadings.fpgaCD2Temp; +} + +/*********************************************************************//** + * @brief + * The getFPGARTDErrorCount function gets error count of the RTD. It covers \n + * all the four conductivity sensors which include temperature sensors + * @details + * Inputs : fpgaSensorReadings.fpgaRTDErrorCnt + * Outputs : none + * @param none + * @return Last error count of the RTD conductivity sensors + *************************************************************************/ +U08 getFPGARTDErrorCount( void ) +{ + return fpgaSensorReadings.fpgaRTDErrorCnt; +} + +/*********************************************************************//** + * @brief + * The getFPGARTDReadCount function gets the read count of the RTD \n + * conductivity sensors. It covers all the 4 conductivity sensors + * @details + * Inputs : fpgaSensorReadings.fpgaRTDReadCnt + * Outputs : none + * @param none + * @return Last read count of the RTC conductivity sensors + *************************************************************************/ +U08 getFPGARTDReadCount( void ) +{ + return fpgaSensorReadings.fpgaRTDReadCnt; +} + +/*********************************************************************//** + * @brief + * The getFPGATRoTemp function gets the latest redundant sensor outlet \n + * temperature reading in ADC. + * @details + * Inputs : fpgaSensorReadings.fpgaTHDoTemp + * Outputs : none + * @param none + * @return Last redundant sensor outlet temperature reading + *************************************************************************/ +U32 getFPGATHDoTemp( void ) +{ + return fpgaSensorReadings.fpgaTHDoTemp; +} + +/*********************************************************************//** + * @brief + * The getFPGATHDoErrorCount gets the error count of the THDo (redundant) \n + * temperature sensor + * @details + * Inputs : fpgaSensorReadings.fpgaTHDoErrorCnt + * Outputs : none + * @param none + * @return Last redundant sensor outlet temperature error count + *************************************************************************/ +U08 getFPGATHDoErrorCount( void ) +{ + return fpgaSensorReadings.fpgaTHDoErrorCnt; +} + +/*********************************************************************//** + * @brief + * The getFPGATHDoReadCount gets the read count of the THDo (redundant) \n + * @details + * Inputs : fpgaSensorReadings.fpgaTHDoReadCnt + * Outputs : none + * @param none + * @return Last redundant sensor outlet temperature error count reading + *************************************************************************/ +U08 getFPGATHDoReadCount( void ) +{ + return fpgaSensorReadings.fpgaTHDoReadCnt; +} + +/*********************************************************************//** + * @brief + * The getFPGATDiTemp function gets the latest dialysate inlet \n + * temperature reading in ADC. + * @details + * Inputs : fpgaSensorReadings.fpgaTDiTemp + * Outputs : none + * @param none + * @return last primary heater outlet temperature reading + *************************************************************************/ +U32 getFPGATDiTemp( void ) +{ + return fpgaSensorReadings.fpgaTDiTemp; +} + +/*********************************************************************//** + * @brief + * The getFPGATDiErrorCount function gets the latest dialysate inlet \n + * temperature error count. + * @details + * Inputs : fpgaSensorReadings.fpgaTDiErrorCnt + * Outputs : none + * @param none + * @return Last dialysate inlet error count + *************************************************************************/ +U08 getFPGATDiErrorCount( void ) +{ + return fpgaSensorReadings.fpgaTDiErrorCnt; +} + +/*********************************************************************//** + * @brief + * The getFPGATDiReadCount function gets the latest dialysate inlet \n + * temperature read count. + * @details + * Inputs : fpgaSensorReadings.fpgaTDiReadCnt + * Outputs : none + * @param none + * @return Last dialysate inlet read count + *************************************************************************/ +U08 getFPGATDiReadCount( void ) +{ + return fpgaSensorReadings.fpgaTDiReadCnt; +} + +/*********************************************************************//** + * @brief * The getFPGAPrimaryHeaterTemp function gets the latest primary heater \n * internal temperature reading. * @details @@ -1125,8 +1274,38 @@ /*********************************************************************//** * @brief + * The getFPGAPrimaryHeaterFlags function gets the latest primary heater \n + * internal temperature sensor flags read + * @details + * Inputs : fpgaSensorReadings.fpgaPrimaryHeaterFlags + * Outputs : none + * @param none + * @return Last primary heater internal temperature sensor flag read + *************************************************************************/ +U08 getFPGAPrimaryHeaterFlags( void ) +{ + return fpgaSensorReadings.fpgaPrimaryHeaterFlags; +} + +/*********************************************************************//** + * @brief + * The geetFPGAPrimaryHeaterReadCount function gets the latest primary heater \n + * internal temperature sensor read count + * @details + * Inputs : fpgaSensorReadings.fpgaPrimaryHeaterReadCnt + * Outputs : none + * @param none + * @return Last primary heater internal temperature sensor read count + *************************************************************************/ +U08 getFPGAPrimaryHeaterReadCount( void ) +{ + return fpgaSensorReadings.fpgaPrimaryHeaterReadCnt; +} + +/*********************************************************************//** + * @brief * The getFPGATrimmerHeaterTemp function gets the latest trimmer heater \n - * internal temperature reading. + * internal temperature sensor reading. * @details * Inputs : fpgaSensorReadings.fpgaTrimmerHeaterIntTemp * Outputs : none @@ -1137,3 +1316,33 @@ { return fpgaSensorReadings.fpgaTrimmerHeaterIntTemp; } + +/*********************************************************************//** + * @brief + * The getFPGATrimmerHeaterFlags function gets the latest trimmer heater \n + * internal temperature flags read. + * @details + * Inputs : fpgaSensorReadings.fpgaTrimmerHeaterFlags + * Outputs : none + * @param none + * @return Last trimmer heater internal temperature flags read + *************************************************************************/ +U08 getFPGATrimmerHeaterFlags( void ) +{ + return fpgaSensorReadings.fpgaTrimmerHeaterFlags; +} + +/*********************************************************************//** + * @brief + * The getFPGATrimmerHeaterReadCount function gets the latest trimmer heater \n + * internal temperature read count. + * @details + * Inputs : fpgaSensorReadings.fpgaTrimmerHeaterReadCnt + * Outputs : none + * @param none + * @return Last trimmer heater internal temperature read count + *************************************************************************/ +U08 getFPGATrimmerHeaterReadCount( void ) +{ + return fpgaSensorReadings.fpgaTrimmerHeaterReadCnt; +}