/************************************************************************** * * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * @file ModeFlush.c * * @author (last) Sean Nash * @date (last) 26-May-2020 * * @author (original) Leonardo Baloa * @date (original) 20-Dec-2019 * ***************************************************************************/ #include "ModeFlush.h" #include "OperationModes.h" /** * @addtogroup DGFlushMode * @{ */ // ********** private definitions ********** // ********** private data ********** static DG_FLUSH_STATE_T flushState = DG_FLUSH_STATE_START; ///< Currently active flush state. // ********** private function prototypes ********** /*********************************************************************//** * @brief * The initFlushMode function initializes flush Mode module. * @details * Inputs : none * Outputs : none * @return none *************************************************************************/ void initFlushMode( void ) { flushState = DG_FLUSH_STATE_START; } /*********************************************************************//** * @brief * The transitionToFlushMode function prepares for transition to \n * flush mode. * @details * Inputs : none * Outputs : * @return none *************************************************************************/ void transitionToFlushMode( void ) { initFlushMode(); } /*********************************************************************//** * @brief * The execFlushMode function executes the flush Mode state machine. * @details * Inputs : none * Outputs : * @return current state. *************************************************************************/ U32 execFlushMode( void ) { // execute current flush state switch ( flushState ) { case DG_FLUSH_STATE_START: break; default: // TODO - s/w fault flushState = DG_FLUSH_STATE_START; break; } return flushState; } /*********************************************************************//** * @brief * The getCurrentFlushState function returns the current state of the \n * flush mode. * @details * Inputs : flushState * Outputs : none * @return the current state of flush mode. *************************************************************************/ DG_FLUSH_STATE_T getCurrentFlushState( void ) { return flushState; } /**@}*/