/************************************************************************** * * 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 ModePostTreat.c * * @author (last) Sean Nash * @date (last) 08-Oct-2020 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 * ***************************************************************************/ #include "AlarmLamp.h" #include "BloodFlow.h" #include "DialInFlow.h" #include "DialOutFlow.h" #include "Buttons.h" #include "OperationModes.h" #include "ModePostTreat.h" #ifdef RM46_EVAL_BOARD_TARGET #include "Timers.h" static U32 start; #endif /** * @addtogroup HDPostTreatmentMode * @{ */ // ********** private data ********** // ********** private function prototypes ********** /*********************************************************************//** * @brief * The initPostTreatmentMode function initializes the Post-Treatment Mode module. * @details Inputs: none * @details Outputs: Post-Treatment Mode module initialized. * @return none *************************************************************************/ void initPostTreatmentMode( void ) { } /*********************************************************************//** * @brief * The transitionToPostTreatmentMode function prepares for transition to * post-treatment mode. * @details Inputs: none * @details Outputs: none * @return none *************************************************************************/ void transitionToPostTreatmentMode( void ) { #ifdef RM46_EVAL_BOARD_TARGET start = getMSTimerCount(); #endif } /*********************************************************************//** * @brief * The execPostTreatmentMode function executes the Post-Treatment Mode state machine. * @details Inputs: none * @details Outputs: none * @return current state (sub-mode) *************************************************************************/ U32 execPostTreatmentMode( void ) { BOOL stop = isStopButtonPressed(); #ifdef DISABLE_UI_TREATMENT_WORKFLOW if ( TRUE == stop ) #endif { requestNewOperationMode( MODE_STAN ); } #ifdef RM46_EVAL_BOARD_TARGET if ( TRUE == didTimeout( start, 5000U ) ) { requestNewOperationMode( MODE_STAN ); } #endif return 0; // TODO - return current state } /*********************************************************************//** * @brief * The signalAlarmActionToPostTreatmentMode function executes the given alarm action * as appropriate while in PostTreatment Mode. * @details Inputs: none * @details Outputs: given alarm action executed * @param action ID of alarm action to execute * @return none *************************************************************************/ void signalAlarmActionToPostTreatmentMode( ALARM_ACTION_T action ) { } /**@}*/