Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -r8910c1a21976afcc84fe1d9504916efbc192325d -rcee800793b514f2fccd3776386b6cca41c6340ca --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 8910c1a21976afcc84fe1d9504916efbc192325d) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision cee800793b514f2fccd3776386b6cca41c6340ca) @@ -19,6 +19,7 @@ #include "AlarmLamp.h" #include "BloodFlow.h" #include "Buttons.h" +#include "Compatibility.h" #include "CPLD.h" #include "DialInFlow.h" #include "FPGA.h" @@ -101,7 +102,7 @@ switch ( postState ) { case POST_STATE_START: - postState = POST_STATE_WATCHDOG; + postState = POST_STATE_FW_COMPATIBILITY; #ifdef SKIP_POST postState = POST_STATE_COMPLETED; #endif @@ -165,6 +166,11 @@ postState = handlePOSTStatus( testStatus ); break; + case POST_STATE_FW_COMPATIBILITY: + testStatus = execFWCompatibilityTest(); + postState = handlePOSTStatus( testStatus ); + break; + // Should be last POST case POST_STATE_STUCK_BUTTON: testStatus = execStuckButtonTest(); @@ -261,8 +267,9 @@ } else if ( testStatus == SELF_TEST_STATUS_FAILED ) { - requestAlarmLampPattern( LAMP_PATTERN_FAULT ); + // At least one POST has failed tempPOSTPassed = FALSE; + // Test that failed should have triggered a fault which will request fault mode, so should POST state machine should never see FAILED state and will fault if it does result = POST_STATE_FAILED; } else @@ -272,3 +279,19 @@ return result; } + +/*********************************************************************//** + * @brief + * The execFWCompatibilityTest function executes the firmware compatibility test. + * @details Inputs: watchdogSelfTestState + * @details Outputs: watchdogSelfTestState + * @return in progress, passed, or failed + *************************************************************************/ +static SELF_TEST_STATUS_T execFWCompatibilityTest( void ) +{ + SELF_TEST_STATUS_T result = SELF_TEST_STATUS_PASSED; + + // TODO - implement + + return result; +}