Index: firmware/App/Modes/ModeFlush.c =================================================================== diff -u -rc48a99d2d1c852adcc986253b6c420a90dab7bfe -rf5b02f03b6695c0c76fd8a4d902a13114e1a8aca --- firmware/App/Modes/ModeFlush.c (.../ModeFlush.c) (revision c48a99d2d1c852adcc986253b6c420a90dab7bfe) +++ firmware/App/Modes/ModeFlush.c (.../ModeFlush.c) (revision f5b02f03b6695c0c76fd8a4d902a13114e1a8aca) @@ -24,16 +24,9 @@ // ********** private definitions ********** -/// Enumeration of flush mode states. -typedef enum Flush_States -{ - FLUSH_STATE_START = 0, ///< Start flush mode state. - NUM_OF_FLUSH_STATES ///< Number of flush mode states. -} FLUSH_STATE_T; - // ********** private data ********** -static FLUSH_STATE_T flushState = FLUSH_STATE_START; ///< Currently active flush state. +static DG_FLUSH_STATE_T flushState = DG_FLUSH_STATE_START; ///< Currently active flush state. // ********** private function prototypes ********** @@ -47,7 +40,7 @@ *************************************************************************/ void initFlushMode( void ) { - flushState = FLUSH_STATE_START; + flushState = DG_FLUSH_STATE_START; } /*********************************************************************//** @@ -70,21 +63,37 @@ * @details * Inputs : none * Outputs : - * @return none + * @return current state. *************************************************************************/ -void execFlushMode( void ) +U32 execFlushMode( void ) { // execute current flush state switch ( flushState ) { - case FLUSH_STATE_START: + case DG_FLUSH_STATE_START: break; default: - flushState = FLUSH_STATE_START; // 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; +} + /**@}*/