Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -rbaa9fb9bb10eed6cd211abaa80e9f9acffdeb20d -rfc12876da6930c955864352182aee2076513a1cc --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision baa9fb9bb10eed6cd211abaa80e9f9acffdeb20d) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision fc12876da6930c955864352182aee2076513a1cc) @@ -47,18 +47,20 @@ // ********** private data ********** -static HD_POST_STATE_T postState; ///< Current state of initialize and POST mode. -static BOOL postCompleted; ///< Flag indicates whether POST is completed. -static BOOL postPassed; ///< Flag indicates all POST tests passed. -static BOOL tempPOSTPassed; ///< Flag indicates all POST tests have passed so far. +static HD_POST_STATE_T postState; ///< Current state of initialize and POST mode. +static BOOL postCompleted; ///< Flag indicates whether POST is completed. +static BOOL postPassed; ///< Flag indicates all POST tests passed. +static BOOL tempPOSTPassed; ///< Flag indicates all POST tests have passed so far. -static BOOL uiPOSTPassed; ///< Final result for UI POST tests (TRUE = passed, FALSE = failed). -static BOOL dgPOSTPassed; ///< Final result for DG POST tests (TRUE = passed, FALSE = failed). -static BOOL uiPOSTResultReceived; ///< Have we received a final POST result from the UI? -static BOOL dgPOSTResultReceived; ///< Have we received a final POST result from the DG? -static U32 waitForUIPostTimerCtr; ///< Timer counter to limit wait for UI final POST result. +static BOOL uiPOSTPassed; ///< Final result for UI POST tests (TRUE = passed, FALSE = failed). +static BOOL dgPOSTPassed; ///< Final result for DG POST tests (TRUE = passed, FALSE = failed). +static BOOL uiPOSTResultReceived; ///< Have we received a final POST result from the UI? +static BOOL dgPOSTResultReceived; ///< Have we received a final POST result from the DG? +static U32 waitForUIPostTimerCtr; ///< Timer counter to limit wait for UI final POST result. +static U32 postCompleteDelayTimerCtr; ///< Timer counter for 2 second delay after POST completes and before transitioning to Standbymode. -static U32 postCompleteDelayTimerCtr; ///< Timer counter for 2 second delay after POST completes and before transitioning to Standbymode. +static UI_VERSIONS_T uiVersion = { 0, 0, 0, 0, 0 }; ///< Version and compatibility information reported by UI. +static DG_VERSIONS_T dgVersion = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; ///< Version and compatibility information reported by DG. // ********** private function prototypes ********** @@ -292,6 +294,32 @@ /*********************************************************************//** * @brief + * The signalUIVersion function records the reported UI version information. + * @details Inputs: none + * @details Outputs: uiVersion + * @param version Version information reported by UI + * @return none + *************************************************************************/ +void signalUIVersion( UI_VERSIONS_T version ) +{ + uiVersion = version; +} + +/*********************************************************************//** + * @brief + * The signalDGVersion function records the reported DG version information. + * @details Inputs: none + * @details Outputs: dgVersion + * @param version Version information reported by DG + * @return none + *************************************************************************/ +void signalDGVersion( DG_VERSIONS_T version ) +{ + dgVersion = version; +} + +/*********************************************************************//** + * @brief * The isPOSTCompleted function determines whether all HD POST have * been run and completed. If true, call the isPOSTPassed() to see final * result (pass/fail). @@ -366,8 +394,11 @@ { SELF_TEST_STATUS_T result = SELF_TEST_STATUS_PASSED; - // TODO - implement (need UI to include its version/compatibility info in its request for f/w versions so we can check compatibility) - //SW_COMPATIBILITY_REV + if ( uiVersion.compatibility != SW_COMPATIBILITY_REV ) + { + result = SELF_TEST_STATUS_FAILED; + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_HD_UI_COMPATIBILITY_ERROR, uiVersion.compatibility, SW_COMPATIBILITY_REV ) + } return result; }