Index: firmware/App/Services/FPGA.c =================================================================== diff -u -rf7e3018ec6ab762fe08efb42b21fb2ca970174b0 -r07a5add2dff254f7be3699e4efac2b99d3554847 --- firmware/App/Services/FPGA.c (.../FPGA.c) (revision f7e3018ec6ab762fe08efb42b21fb2ca970174b0) +++ firmware/App/Services/FPGA.c (.../FPGA.c) (revision 07a5add2dff254f7be3699e4efac2b99d3554847) @@ -914,6 +914,90 @@ } /************************************************************************* + * @brief getFPGABloodPumpOcclusion + * The getFPGABloodPumpOcclusion function gets the latest blood occlusion reading. + * @details + * Inputs : fpgaSensorReadings + * Outputs : none + * @param none + * @return last blood occlusion reading + *************************************************************************/ +U16 getFPGABloodPumpOcclusion( void ) +{ + return fpgaSensorReadings.bloodOcclusionData; +} + +/************************************************************************* + * @brief getFPGADialInPumpOcclusion + * The getFPGADialInPumpOcclusion function gets the latest dialysate \n + * inlet occlusion reading. + * @details + * Inputs : fpgaSensorReadings + * Outputs : none + * @param none + * @return last dialysate inlet occlusion reading + *************************************************************************/ +U16 getFPGADialInPumpOcclusion( void ) +{ +#ifdef DEBUG_ENABLED + { + // TODO - temporary debug code - remove later + char debugOccStr[ 60 ]; + S32 dat = fpgaSensorReadings.dialysateInOcclusionData; + S32 rct = fpgaSensorReadings.dialysateInOcclusionReadCount; + S32 ect = fpgaSensorReadings.dialysateInOcclusionErrorCount; + + sprintf( debugOccStr, "Data %5d Reads %5d Errors %5d\n", dat, rct, ect ); + sendDebugData( (U08*)debugOccStr, strlen(debugOccStr) ); + } +#endif + return fpgaSensorReadings.dialysateInOcclusionData; +} + +/************************************************************************* + * @brief getFPGADialOutPumpOcclusion + * The getFPGADialOutPumpOcclusion function gets the latest dialysate \n + * outlet occlusion reading. + * @details + * Inputs : fpgaSensorReadings + * Outputs : none + * @param none + * @return last dialysate outlet occlusion reading + *************************************************************************/ +U16 getFPGADialOutPumpOcclusion( void ) +{ + return fpgaSensorReadings.dialysateOutOcclusionData; +} + +/************************************************************************* + * @brief getFPGAArterialPressure + * The getFPGAArterialPressure function gets the latest arterial pressure reading. + * @details + * Inputs : fpgaSensorReadings + * Outputs : none + * @param none + * @return last arterial pressure reading + *************************************************************************/ +U16 getFPGAArterialPressure( void ) +{ + return fpgaSensorReadings.arterialPressureData; +} + +/************************************************************************* + * @brief getFPGAVenousPressure + * The getFPGAVenousPressure function gets the venous arterial pressure reading. + * @details + * Inputs : fpgaSensorReadings + * Outputs : none + * @param none + * @return last venous pressure reading + *************************************************************************/ +U16 getFPGAVenousPressure( void ) +{ + return 0; // TODO - return reading when available +} + +/************************************************************************* * @brief consumeUnexpectedData * The consumeUnexpectedData function checks to see if a byte is sitting in \n * the SCI2 received data register.