Index: firmware/App/Services/FPGA.c =================================================================== diff -u -rf7e3018ec6ab762fe08efb42b21fb2ca970174b0 -r9864b14f76782f1e68bf266dcd843451748715a0 --- firmware/App/Services/FPGA.c (.../FPGA.c) (revision f7e3018ec6ab762fe08efb42b21fb2ca970174b0) +++ firmware/App/Services/FPGA.c (.../FPGA.c) (revision 9864b14f76782f1e68bf266dcd843451748715a0) @@ -914,6 +914,76 @@ } /************************************************************************* + * @brief getFPGABloodOcclusion + * The getFPGABloodOcclusion function gets the latest blood occlusion reading. + * @details + * Inputs : fpgaSensorReadings + * Outputs : none + * @param none + * @return last blood occlusion reading + *************************************************************************/ +F32 getFPGABloodOcclusion( void ) +{ + return fpgaSensorReadings.bloodOcclusionData; +} + +/************************************************************************* + * @brief getFPGADialysateInletOcclusion + * The getFPGADialysateInletOcclusion function gets the latest dialysate \n + * inlet occlusion reading. + * @details + * Inputs : fpgaSensorReadings + * Outputs : none + * @param none + * @return last dialysate inlet occlusion reading + *************************************************************************/ +F32 getFPGADialysateInletOcclusion( 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 getFPGADialysateOutletOcclusion + * The getFPGADialysateOutletOcclusion function gets the latest dialysate \n + * outlet occlusion reading. + * @details + * Inputs : fpgaSensorReadings + * Outputs : none + * @param none + * @return last dialysate outlet occlusion reading + *************************************************************************/ +F32 getFPGADialysateOutletOcclusion( 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 + *************************************************************************/ +F32 getFPGAArterialPressure( void ) +{ + return fpgaSensorReadings.arterialPressureData; +} + +/************************************************************************* * @brief consumeUnexpectedData * The consumeUnexpectedData function checks to see if a byte is sitting in \n * the SCI2 received data register.