Index: firmware/App/Modes/ModeSolo.c =================================================================== diff -u -rfbf04988794f0eaa8a7a596a349bae1dfff0e079 -ra504d6899e709d7432af9c055db1bd1fe340d032 --- firmware/App/Modes/ModeSolo.c (.../ModeSolo.c) (revision fbf04988794f0eaa8a7a596a349bae1dfff0e079) +++ firmware/App/Modes/ModeSolo.c (.../ModeSolo.c) (revision a504d6899e709d7432af9c055db1bd1fe340d032) @@ -1,4 +1,4 @@ -/************************************************************************** +/**********************************************************************//** * * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. * @@ -18,46 +18,82 @@ #include "ModeSolo.h" #include "CPLD.h" +/** + * @addtogroup DGSoloStandbyMode + * @{ + */ + +// ********** private definitions ********** + // ********** private data ********** +static DG_SOLO_STANDBY_STATE_T soloState = DG_SOLO_STANDBY_STATE_START; ///< Currently active solo standby state. + // ********** private function prototypes ********** -/************************************************************************* +/*********************************************************************//** * @brief * The initSoloMode function initializes the Standby-Solo Mode module. * @details * Inputs : none * Outputs : Standby-Solo Mode module initialized. - * @param none * @return none *************************************************************************/ void initSoloMode( void ) { + soloState = DG_SOLO_STANDBY_STATE_START; } -/************************************************************************* +/*********************************************************************//** * @brief * The transitionToSoloMode function prepares for transition to standby-solo mode. * @details * Inputs : none * Outputs : - * @param none * @return none *************************************************************************/ void transitionToSoloMode( void ) { + initSoloMode(); } -/************************************************************************* +/*********************************************************************//** * @brief * The execSoloMode function executes the Standby-Solo Mode state machine. * @details * Inputs : none * Outputs : - * @param none - * @return none + * @return current state. *************************************************************************/ -void execSoloMode( void ) +U32 execSoloMode( void ) { + // execute current solo standby state + switch ( soloState ) + { + case DG_SOLO_STANDBY_STATE_START: + break; + default: + // TODO - s/w fault + soloState = DG_SOLO_STANDBY_STATE_START; + break; + } + + return soloState; } + +/*********************************************************************//** + * @brief + * The getCurrentSoloState function returns the current state of the \n + * standby-solo mode. + * @details + * Inputs : soloState + * Outputs : none + * @return the current state of standby-solo mode. + *************************************************************************/ +DG_SOLO_STANDBY_STATE_T getCurrentSoloState( void ) +{ + return soloState; +} + +/**@}*/