Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rcbef3eeccf761b959283d027da24ac389df48434 -r87467f3b071eae26bc855e20e718acb159c648bb --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision cbef3eeccf761b959283d027da24ac389df48434) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 87467f3b071eae26bc855e20e718acb159c648bb) @@ -8,7 +8,7 @@ * @file SystemCommMessages.c * * @author (last) Michael Garthwaite -* @date (last) 10-Aug-2023 +* @date (last) 15-Aug-2023 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -28,6 +28,7 @@ #include "FlowSensors.h" #include "FPGA.h" #include "Heaters.h" +#include "Integrity.h" #include "ModeChemicalDisinfect.h" #include "ModeChemicalDisinfectFlush.h" #include "ModeDrain.h" @@ -4945,4 +4946,36 @@ sendUIResponseMsg( MSG_ID_DG_RO_ONLY_MODE_STATUS_RESPONSE, roMode, rejReason ); } +/*********************************************************************//** + * @brief + * The handleTestHDRAMStatusOverrideRequest function handles a request to + * override the RAM status register. + * @details Inputs: none + * @details Outputs: message handled + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +void handleTestDGRAMStatusOverrideRequest( MESSAGE_T* message ) +{ + TEST_OVERRIDE_ARRAY_PAYLOAD_T payload; + BOOL result = FALSE; + + // verify payload length + if ( sizeof(TEST_OVERRIDE_ARRAY_PAYLOAD_T) == message->hdr.payloadLen ) + { + memcpy( &payload, message->payload, sizeof(TEST_OVERRIDE_ARRAY_PAYLOAD_T) ); + if ( FALSE == payload.reset ) + { + result = testSetRAMStatusOverride( payload.index, payload.state.u32 ); + } + else + { + result = testResetRAMStatusOverride( payload.index ); + } + } + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + /**@}*/