Index: firmware/App/DDCommon.h =================================================================== diff -u -re803f3e6d135641015dc78e2aeac0a5489c9492c -r498757853c009a4e25dec98461be91fcadd8057d --- firmware/App/DDCommon.h (.../DDCommon.h) (revision e803f3e6d135641015dc78e2aeac0a5489c9492c) +++ firmware/App/DDCommon.h (.../DDCommon.h) (revision 498757853c009a4e25dec98461be91fcadd8057d) @@ -25,7 +25,7 @@ #define DD_VERSION_MAJOR 0 #define DD_VERSION_MINOR 0 #define DD_VERSION_MICRO 0 -#define DD_VERSION_BUILD 11 +#define DD_VERSION_BUILD 12 // ********** development build switches ********** Index: firmware/App/Services/AlarmMgmtSWFaults.h =================================================================== diff -u -r977f03e20990ed5579160b9b927df1c0f2428101 -r498757853c009a4e25dec98461be91fcadd8057d --- firmware/App/Services/AlarmMgmtSWFaults.h (.../AlarmMgmtSWFaults.h) (revision 977f03e20990ed5579160b9b927df1c0f2428101) +++ firmware/App/Services/AlarmMgmtSWFaults.h (.../AlarmMgmtSWFaults.h) (revision 498757853c009a4e25dec98461be91fcadd8057d) @@ -139,6 +139,10 @@ SW_FAULT_ID_PRE_GEND_WET_SELF_TEST_INVALID_EXEC_STATE1 = 108, SW_FAULT_ID_UF_INVALID_EXEC_STATE = 109, SW_FAULT_ID_SPENT_CHAMBER_FILL_INVALID_EXEC_STATE = 110, + SW_FAULT_ID_TD_INVALID_BLOOD_LEAK_STATE = 111, + SW_FAULT_ID_BLOOD_LEAK_EMBEDDED_MODE_INVALID_STATE = 112, + SW_FAULT_ID_BLOOD_LEAK_ENQUEUE_FAILURE = 113, + SW_FAULT_ID_BLOOD_LEAK_INVALID_EMB_MODE_CMD_SELECTED = 114, #ifdef __PUMPTEST__ // Assigning high value to separate from actual fault id from test fault ids. SW_FAULT_ID_PISTON_PUMP_EXEC_INVALID_STATE = 9000, Index: firmware/App/Services/FpgaDD.c =================================================================== diff -u -re3ea1f5251b7a7af6e47b9e013c3cfc11466e255 -r498757853c009a4e25dec98461be91fcadd8057d --- firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision e3ea1f5251b7a7af6e47b9e013c3cfc11466e255) +++ firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision 498757853c009a4e25dec98461be91fcadd8057d) @@ -3130,4 +3130,98 @@ return status; } +// Blood leak functions +/*********************************************************************//** + * @brief + * The getFPGABloodLeakStatus function returns the blood leak sensor's + * blood detection status bit. + * @details \b Inputs: fpgaSensorReadings + * @details \b Outputs: none + * @return blood leak sensor self test status bit + *************************************************************************/ +U08 getFPGABloodLeakStatus( void ) +{ + U08 selfTestStatus = fpgaSensorReadings.fpgaD42PulseStatus; + + return selfTestStatus; +} + +/*********************************************************************//** + * @brief + * The setFPGABloodLeakUARTControl function sets the blood leak sensor UART + * control value. + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints + * @return none + *************************************************************************/ +void setFPGABloodLeakUARTControl( U08 value ) +{ + fpgaActuatorSetPoints.fpgaD42UARTControl = value; +} + +/*********************************************************************//** + * @brief + * The setFPGABloodLeakUARTTransmit function sets the blood leak sensor UART + * transmit value. + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints + * @return none + *************************************************************************/ +void setFPGABloodLeakUARTTransmit( U08 value ) +{ + fpgaActuatorSetPoints.fpgaD42FIFOTx = value; +} + +/*********************************************************************//** + * @brief + * The getFPGABloodLeakTxFIFOCount function returns the blood leak transmit + * FIFO count. + * @details \b Inputs: fpgaSensorReadings + * @details \b Outputs: none + * @return fpgaSensorReadings.fpgaD42TxFIFOCnt + *************************************************************************/ +U08 getFPGABloodLeakTxFIFOCount( void ) +{ + return fpgaSensorReadings.fpgaD42TxFIFOCnt; +} + +/*********************************************************************//** + * @brief + * The getFPGABloodLeakRxFIFOCount function returns the blood leak receive + * FIFO count. + * @details \b Inputs: fpgaSensorReadings + * @details \b Outputs: none + * @return fpgaSensorReadings.fpgaD42RxFIFOCnt + *************************************************************************/ +U16 getFPGABloodLeakRxFIFOCount( void ) +{ + return fpgaSensorReadings.fpgaD42RxFIFOCnt; +} + +/*********************************************************************//** + * @brief + * The getFPGABloodLeakRxErrorCount function returns the blood leak receive + * error count. + * @details \b Inputs: fpgaSensorReadings + * @details \b Outputs: none + * @return fpgaSensorReadings.fpgaD42RxErrorCnt + *************************************************************************/ +U08 getFPGABloodLeakRxErrorCount( void ) +{ + return fpgaSensorReadings.fpgaD42RxErrorCnt; +} + +/*********************************************************************//** + * @brief + * The getFPGABloodLeakRxFIFODataOut function returns the blood leak receive + * FIFO data out. + * @details \b Inputs: fpgaSensorReadings + * @details \b Outputs: none + * @return fpgaSensorReadings.fpgaD42RxFIFODataOut + *************************************************************************/ +U08 getFPGABloodLeakRxFIFODataOut( void ) +{ + return fpgaSensorReadings.fpgaD42RxFIFODataOut; +} + /**@}*/ Index: firmware/App/Services/FpgaDD.h =================================================================== diff -u -re3ea1f5251b7a7af6e47b9e013c3cfc11466e255 -r498757853c009a4e25dec98461be91fcadd8057d --- firmware/App/Services/FpgaDD.h (.../FpgaDD.h) (revision e3ea1f5251b7a7af6e47b9e013c3cfc11466e255) +++ firmware/App/Services/FpgaDD.h (.../FpgaDD.h) (revision 498757853c009a4e25dec98461be91fcadd8057d) @@ -257,6 +257,15 @@ void setFPGAD5HeaterPWMLowState( U16 count ); void setFPGAD5HeaterPWMPeriod( U16 period ); +//Blood leak detector +U08 getFPGABloodLeakStatus( void ); +void setFPGABloodLeakUARTControl( U08 value ); +void setFPGABloodLeakUARTTransmit( U08 value ); +U08 getFPGABloodLeakTxFIFOCount( void ); +U16 getFPGABloodLeakRxFIFOCount( void ); +U08 getFPGABloodLeakRxErrorCount( void ); +U08 getFPGABloodLeakRxFIFODataOut( void ); + /**@}*/ #endif Index: firmware/App/Services/Messaging.c =================================================================== diff -u -rc51c9d66062c27c588006850550b412ea7dd5144 -r498757853c009a4e25dec98461be91fcadd8057d --- firmware/App/Services/Messaging.c (.../Messaging.c) (revision c51c9d66062c27c588006850550b412ea7dd5144) +++ firmware/App/Services/Messaging.c (.../Messaging.c) (revision 498757853c009a4e25dec98461be91fcadd8057d) @@ -19,6 +19,7 @@ #include "reg_system.h" #include "BalancingChamber.h" +#include "BloodLeak.h" #include "Conductivity.h" #include "Compatible.h" #include "ConcentratePumps.h" @@ -165,6 +166,14 @@ { MSG_ID_DD_SAFETY_SHUTDOWN_OVERRIDE_REQUEST, &testSetResetSafetyShutdownOverride }, { MSG_ID_DD_UF_DATA_PUBLISH_OVERRIDE_REQUEST, &testDDUFDataPublishIntervalOverride }, { MSG_ID_DD_SPENT_CHAMB_FILL_DATA_PUBLISH_OVERRIDE_REQUEST, &testDDSpentChamberFillDataPublishIntervalOverride }, + { MSG_ID_DD_BLOOD_LEAK_DATA_PUBLISH_INTERVAL_OVERRIDE_REQUEST, &testBloodLeakDataPublishIntervalOverride }, + { MSG_ID_DD_BLOOD_LEAK_STATUS_OVERRIDE_REQUEST, &testBloodLeakStatusOverride }, + { MSG_ID_DD_BLOOD_LEAK_SET_TO_EMBEDDED_MODE_REQUEST, &testSetBloodLeak2EmbeddedMode }, + { MSG_ID_DD_BLOOD_LEAK_SET_EMBEDDED_MODE_CMD_REQUEST, &testSetBloodLeakEmbeddedModeCommand }, + { MSG_ID_DD_BLOOD_LEAK_EMBEDDED_MODE_INFO_OVERRIDE_REQUEST, &testBloodLeakEmbeddedModeInfoOverride }, + { MSG_ID_DD_BLOOD_LEAK_INTENSITY_MOVING_AVERAGE_OVERRIDE_REQUEST, &testBloodLeakIntensityMovingAverageOverride }, + { MSG_ID_DD_BLOOD_LEAK_ZEROING_INTERVAL_IN_MS_OVERRIDE_REQUEST, &testBloodLeakZeroingIntervalInMillisecondsOverride }, + { MSG_ID_DD_BLOOD_LEAK_ZERO_REQUEST, &testBloodLeakZeroSequenceRequest }, #ifdef __PUMPTEST__ { MSG_ID_DD_PISTON_PUMP_DATA_PUBLISH_OVERRIDE_REQUEST, &testDDPistonPumpControlDataPublishIntervalOverride }, { MSG_ID_DD_PISTON_PUMP_START_STOP_OVERRIDE_REQUEST, &testDDPistonPumpStartStopOverride },