Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -r499e5de29e706d09f79ba22511068990c4044e84 -rc48a99d2d1c852adcc986253b6c420a90dab7bfe --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 499e5de29e706d09f79ba22511068990c4044e84) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision c48a99d2d1c852adcc986253b6c420a90dab7bfe) @@ -1,4 +1,4 @@ -/************************************************************************** +/**********************************************************************//** * * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. * @@ -20,36 +20,41 @@ #include "WatchdogMgmt.h" #include "ModeInitPOST.h" +/** + * @addtogroup InitAndPOSTMode + * @{ + */ + // ********** private definitions ********** +/// Enumeration of init & POST mode states. typedef enum POST_States { - POST_STATE_START = 0, - POST_STATE_FPGA, - POST_STATE_WATCHDOG, - POST_STATE_COMPLETED, - POST_STATE_FAILED, - NUM_OF_POST_STATES + POST_STATE_START = 0, ///< Start initialize & POST mode state. + POST_STATE_FPGA, ///< FPGA POST test state. + POST_STATE_WATCHDOG, ///< Watchdog POST test state. + POST_STATE_COMPLETED, ///< POST completed successfully state. + POST_STATE_FAILED, ///< POST failed state. + NUM_OF_POST_STATES ///< Number of initialize & POST mode states. } POST_STATE_T; // ********** private data ********** -static POST_STATE_T postState = POST_STATE_START; -static BOOL postCompleted = FALSE; -static BOOL postPassed = FALSE; -static BOOL tempPOSTPassed = TRUE; +static POST_STATE_T postState = POST_STATE_START; ///< Currently active initialize & POST state. +static BOOL postCompleted = FALSE; ///< Flag indicating POST completed. +static BOOL postPassed = FALSE; ///< Flag indicating all POST tests passed. +static BOOL tempPOSTPassed = TRUE; ///< Temporary flag indicating all POST tests completed so far have passed. // ********** private function prototypes ********** static POST_STATE_T handlePOSTStatus( SELF_TEST_STATUS_T testStatus ); -/************************************************************************* - * @brief initInitAndPOSTMode +/*********************************************************************//** + * @brief * The initInitAndPOSTMode function initializes the Initialize & POST Mode module. * @details * Inputs : none * Outputs : Initialize & POST Mode module initialized. - * @param none * @return none *************************************************************************/ void initInitAndPOSTMode( void ) @@ -60,27 +65,25 @@ tempPOSTPassed = TRUE; } -/************************************************************************* - * @brief transitionToInitAndPOSTMode +/*********************************************************************//** + * @brief * The transitionToInitAndPOSTMode function prepares for transition to\n * initialize & POST mode. * @details * Inputs : none * Outputs : - * @param none * @return none *************************************************************************/ void transitionToInitAndPOSTMode( void ) { } -/************************************************************************* - * @brief execInitAndPOSTMode +/*********************************************************************//** + * @brief * The execInitAndPOSTMode function executes the Initialize & POST Mode state machine. * @details * Inputs : none * Outputs : - * @param none * @return none *************************************************************************/ void execInitAndPOSTMode( void ) @@ -135,39 +138,37 @@ } } -/************************************************************************* - * @brief isPOSTCompleted +/*********************************************************************//** + * @brief * The isPOSTCompleted function determines whether all HD POST have \n * been run and completed. If true, call the isPOSTPassed() to see final \n * result (pass/fail). * @details * Inputs : postCompleted * Outputs : none - * @param none * @return true if all HD POST tests have completed, false if not *************************************************************************/ BOOL isPOSTCompleted( void ) { return postCompleted; } -/************************************************************************* - * @brief isPOSTPassed +/*********************************************************************//** + * @brief * The isPOSTPassed function determines whether all HD POST have passed. \n * Call this function after POST is complete (call isPOSTCompleted function). * @details * Inputs : postPassed * Outputs : none - * @param none * @return true if all HD POST tests have passed, false if not *************************************************************************/ BOOL isPOSTPassed( void ) { return postPassed; } -/************************************************************************* - * @brief handlePOSTStatus +/*********************************************************************//** + * @brief * The handlePOSTStatus function handles a status result returned by a * POST function. * @details @@ -191,3 +192,5 @@ return result; } + +/**@}*/