Index: firmware/App/Modes/ModeFault.c =================================================================== diff -u -rc48a99d2d1c852adcc986253b6c420a90dab7bfe -rf5b02f03b6695c0c76fd8a4d902a13114e1a8aca --- firmware/App/Modes/ModeFault.c (.../ModeFault.c) (revision c48a99d2d1c852adcc986253b6c420a90dab7bfe) +++ firmware/App/Modes/ModeFault.c (.../ModeFault.c) (revision f5b02f03b6695c0c76fd8a4d902a13114e1a8aca) @@ -24,16 +24,9 @@ // ********** private definitions ********** -/// Enumeration of fault mode states. -typedef enum Fault_States -{ - FAULT_STATE_START = 0, ///< Start solo fault state. - NUM_OF_FAULT_STATES ///< Number of fault mode states. -} FAULT_STATE_T; - // ********** private data ********** -static FAULT_STATE_T faultState = FAULT_STATE_START; ///< Currently active fault state. +static DG_FAULT_STATE_T faultState = DG_FAULT_STATE_START; ///< Currently active fault state. // ********** private function prototypes ********** @@ -47,7 +40,7 @@ *************************************************************************/ void initFaultMode( void ) { - faultState = FAULT_STATE_START; + faultState = DG_FAULT_STATE_START; } /*********************************************************************//** @@ -68,21 +61,37 @@ * @details * Inputs : none * Outputs : - * @return none + * @return current state *************************************************************************/ -void execFaultMode( void ) +U32 execFaultMode( void ) { // execute current fault state switch ( faultState ) { - case FAULT_STATE_START: + case DG_FAULT_STATE_START: break; default: - faultState = FAULT_STATE_START; // TODO - s/w fault + faultState = DG_FAULT_STATE_START; break; } + + return faultState; } +/*********************************************************************//** + * @brief + * The getCurrentFaultState function returns the current state of the \n + * fault mode. + * @details + * Inputs : faultState + * Outputs : none + * @return the current state of fault mode. + *************************************************************************/ +DG_FAULT_STATE_T getCurrentFaultState( void ) +{ + return faultState; +} + /**@}*/