Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -r52ded7b22d4b413aa8182f1343e4fbb78e8c3b0a -r090cfb22a7c0b4738299c3fb411ca77aaba8d968 --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 52ded7b22d4b413aa8182f1343e4fbb78e8c3b0a) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 090cfb22a7c0b4738299c3fb411ca77aaba8d968) @@ -34,7 +34,7 @@ //#include "Pressures.h" //#include "Reservoirs.h" //#include "RTC.h" -//#include "SafetyShutdown.h" +#include "SafetyShutdown.h" #include "Messaging.h" #include "TaskGeneral.h" //#include "TemperatureSensors.h" @@ -53,24 +53,24 @@ // ********** private data ********** -static DG_POST_STATE_T postState; ///< Currently active initialize & POST state. +static DD_POST_STATE_T postState; ///< Currently active initialize & POST state. static BOOL postCompleted; ///< Flag indicating POST completed. static BOOL postPassed; ///< Flag indicating all POST tests passed. static BOOL tempPOSTPassed; ///< Temporary flag indicating all POST tests completed so far have passed. static U32 startPOSTDelayCounter; ///< Start POST delay counter. // ********** private function prototypes ********** -static DG_POST_STATE_T handlePOSTStatus( SELF_TEST_STATUS_T testStatus ); -static DG_POST_STATE_T handlePOSTStateStart( void ); +static DD_POST_STATE_T handlePOSTStatus( SELF_TEST_STATUS_T testStatus ); +static DD_POST_STATE_T handlePOSTStateStart( void ); static SELF_TEST_STATUS_T execFWCompatibilityTest( void ); /*********************************************************************//** * @brief * The initInitAndPOSTMode function initializes the Initialization and POST * mode module. - * @details Inputs: none - * @details Outputs: postState, postCompleted, tempPOSTPassed, + * @details \b Inputs: none + * @details \b Outputs: postState, postCompleted, tempPOSTPassed, * startPOSTDelayCounter * @return none *************************************************************************/ @@ -87,8 +87,8 @@ * @brief * The transitionToInitAndPOSTMode function prepares for transition to * initialization and POST mode. - * @details Inputs: none - * @details Outputs: none + * @details \b Inputs: none + * @details \b Outputs: none * @return initial state *************************************************************************/ U32 transitionToInitAndPOSTMode( void ) @@ -111,8 +111,9 @@ * @brief * The execInitAndPOSTMode function executes the initialization and POST * mode state machine. - * @details Inputs: postState - * @details Outputs: Initialization and POST mode state machine executed + * @details \b Inputs: postState + * @details \b Outputs: Initialization and POST mode state machine executed + * @details \b Alarm: ALARM_ID_DD_SOFTWARE_FAULT when any of the post step fails. * @return current state. *************************************************************************/ U32 execInitAndPOSTMode( void ) @@ -291,8 +292,8 @@ * @brief * The isPOSTCompleted function determines whether all DG POST have been run * and completed. If true, call the isPOSTPassed() to see final result (pass/fail). - * @details Inputs: postCompleted - * @details Outputs: none + * @details \b Inputs: postCompleted + * @details \b Outputs: none * @return true if all HD POST tests have completed, false if not *************************************************************************/ BOOL isPOSTCompleted( void ) @@ -304,8 +305,8 @@ * @brief * The isPOSTPassed function determines whether all HD POST have passed. * Call this function after POST is complete (call isPOSTCompleted function). - * @details Inputs: postPassed - * @details Outputs: none + * @details \b Inputs: postPassed + * @details \b Outputs: none * @return true if all HD POST tests have passed, false if not *************************************************************************/ BOOL isPOSTPassed( void ) @@ -316,23 +317,23 @@ /*********************************************************************//** * @brief * The handlePOSTStatus function handles a status result returned by a POST function. - * @details Inputs: postPassed - * @details Outputs: none + * @details \b Inputs: postPassed + * @details \b Outputs: none * @param testStatus status reported by last test * @return recommended next POST state *************************************************************************/ -static DG_POST_STATE_T handlePOSTStatus( SELF_TEST_STATUS_T testStatus ) +static DD_POST_STATE_T handlePOSTStatus( SELF_TEST_STATUS_T testStatus ) { - DG_POST_STATE_T result = postState; + DD_POST_STATE_T result = postState; if ( ( SELF_TEST_STATUS_PASSED == testStatus ) || ( SELF_TEST_STATUS_FAILED == testStatus ) ) { BOOL passed = ( SELF_TEST_STATUS_PASSED == testStatus ? TRUE : FALSE ); // Broadcast passed POST result - //sendPOSTTestResult( (DG_POST_STATE_T)((int)postState), passed ); + //sendPOSTTestResult( (DD_POST_STATE_T)((int)postState), passed ); // Move on to next POST test - result = (DG_POST_STATE_T)((int)postState + 1); + result = (DD_POST_STATE_T)((int)postState + 1); if ( SELF_TEST_STATUS_FAILED == testStatus ) { tempPOSTPassed = FALSE; @@ -345,13 +346,13 @@ /*********************************************************************//** * @brief * The handlePOSTStateStart function handles the POST start state. - * @details Inputs: startPOSTDelayCounter, systemREG1 - * @details Outputs: startPOSTDelayCounter, systemREG1 + * @details \b Inputs: startPOSTDelayCounter, systemREG1 + * @details \b Outputs: startPOSTDelayCounter, systemREG1 * @return next POST state *************************************************************************/ -static DG_POST_STATE_T handlePOSTStateStart( void ) +static DD_POST_STATE_T handlePOSTStateStart( void ) { - DG_POST_STATE_T state = DG_POST_STATE_START; + DD_POST_STATE_T state = DG_POST_STATE_START; // There is a delay before starting POST to make sure the CAN bus is up and listening so // when the event data can be sent @@ -378,20 +379,20 @@ * @brief * The getCurrentInitAndPOSTState function returns the current state of the * initialization and POST mode. - * @details Inputs: postState - * @details Outputs: none + * @details \b Inputs: postState + * @details \b Outputs: none * @return the current state of initialization and POST mode *************************************************************************/ -DG_POST_STATE_T getCurrentInitAndPOSTState( void ) +DD_POST_STATE_T getCurrentInitAndPOSTState( void ) { return postState; } /*********************************************************************//** * @brief * The execFWCompatibilityTest function executes the firmware compatibility test. - * @details Inputs: none - * @details Outputs: none + * @details \b Inputs: none + * @details \b Outputs: none * @return in progress, passed, or failed *************************************************************************/ static SELF_TEST_STATUS_T execFWCompatibilityTest( void )