Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -rc0d1d149e3b669b0bf424206c725b5c1bfaff797 -r2df21d2472a8d79d78af7e359518acf3614accc5 --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision c0d1d149e3b669b0bf424206c725b5c1bfaff797) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 2df21d2472a8d79d78af7e359518acf3614accc5) @@ -24,32 +24,23 @@ #include "ModeInitPOST.h" #include "NVDataMgmt.h" + /** + * @addtogroup HDInitAndPOSTMode + * @{ + */ + // ********** private definitions ********** -typedef enum POST_States -{ - POST_STATE_START = 0, - POST_STATE_WATCHDOG, - POST_STATE_ALARM_LAMP, - POST_STATE_FPGA, - POST_STATE_RTC, - POST_STATE_NVDATAMGMT, - POST_STATE_STUCK_BUTTON, - POST_STATE_COMPLETED, - POST_STATE_FAILED, - NUM_OF_POST_STATES -} POST_STATE_T; - // ********** private data ********** -static POST_STATE_T postState = POST_STATE_START; +static HD_POST_STATE_T postState = POST_STATE_START; static BOOL postCompleted = FALSE; static BOOL postPassed = FALSE; static BOOL tempPOSTPassed = TRUE; // ********** private function prototypes ********** -static POST_STATE_T handlePOSTStatus( SELF_TEST_STATUS_T testStatus ); +static HD_POST_STATE_T handlePOSTStatus( SELF_TEST_STATUS_T testStatus ); /************************************************************************* * @brief initInitAndPOSTMode @@ -89,9 +80,9 @@ * Inputs : none * Outputs : * @param none - * @return none + * @return current state (sub-mode) *************************************************************************/ -void execInitAndPOSTMode( void ) +U32 execInitAndPOSTMode( void ) { SELF_TEST_STATUS_T testStatus = SELF_TEST_STATUS_IN_PROGRESS; @@ -166,6 +157,8 @@ postState = POST_STATE_FAILED; break; } + + return postState; } /************************************************************************* @@ -209,13 +202,13 @@ * @param testStatus * @return recommended next POST state *************************************************************************/ -static POST_STATE_T handlePOSTStatus( SELF_TEST_STATUS_T testStatus ) +static HD_POST_STATE_T handlePOSTStatus( SELF_TEST_STATUS_T testStatus ) { - POST_STATE_T result = postState; + HD_POST_STATE_T result = postState; if ( testStatus == SELF_TEST_STATUS_PASSED ) { - result = (POST_STATE_T)((int)postState + 1); // move on to next POST test + result = (HD_POST_STATE_T)((int)postState + 1); // move on to next POST test } else if ( testStatus == SELF_TEST_STATUS_FAILED ) {