Index: firmware/App/Modes/ModeService.c =================================================================== diff -u -reb877ae36c28eb83553ee11ccccf42e2c4a5b4d2 -r0fce4283f8f28da957f9e82ec121efbc6ee55241 --- firmware/App/Modes/ModeService.c (.../ModeService.c) (revision eb877ae36c28eb83553ee11ccccf42e2c4a5b4d2) +++ firmware/App/Modes/ModeService.c (.../ModeService.c) (revision 0fce4283f8f28da957f9e82ec121efbc6ee55241) @@ -1,63 +1,84 @@ /************************************************************************** - * - * Copyright (c) 2019-2019 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 ModeService.c - * - * @date 19-Sep-2019 - * @author S. Nash - * - * @brief Top-level state machine for the service mode. - * - **************************************************************************/ +* +* 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 ModeService.c +* +* @author (last) Sean Nash +* @date (last) 24-Sep-2020 +* +* @author (original) Dara Navaei +* @date (original) 05-Nov-2019 +* +***************************************************************************/ -#include "Common.h" #include "OperationModes.h" #include "ModeService.h" +/** + * @addtogroup HDServiceMode + * @{ + */ + // ********** private data ********** // ********** private function prototypes ********** -/************************************************************************* - * @brief initServiceMode +/*********************************************************************//** + * @brief * The initServiceMode function initializes the Service Mode module. - * @details - * Inputs : none - * Outputs : Service Mode module initialized. - * @param none + * @details Inputs: none + * @details Outputs: Service Mode module initialized. * @return none *************************************************************************/ void initServiceMode( void ) { } -/************************************************************************* - * @brief transitionToServiceMode +/*********************************************************************//** + * @brief * The transitionToServiceMode function prepares for transition to service mode. - * @details - * Inputs : none - * Outputs : - * @param none + * @details Inputs: none + * @details Outputs: none * @return none *************************************************************************/ void transitionToServiceMode( void ) { + // set user alarm recovery actions allowed in this mode + setAlarmUserActionEnabled( ALARM_USER_ACTION_RESUME, TRUE ); + setAlarmUserActionEnabled( ALARM_USER_ACTION_RINSEBACK, FALSE ); + setAlarmUserActionEnabled( ALARM_USER_ACTION_END_TREATMENT, FALSE ); + } -/************************************************************************* - * @brief execServiceMode +/*********************************************************************//** + * @brief * The execServiceMode function executes the Service Mode state machine. - * @details - * Inputs : none - * Outputs : - * @param none + * @details Inputs: none + * @details Outputs: none + * @return current state (sub-mode) + *************************************************************************/ +U32 execServiceMode( void ) +{ + + return 0; // TODO - return current state +} + +/*********************************************************************//** + * @brief + * The signalAlarmActionToServiceMode function executes the given alarm action + * as appropriate while in Service Mode. + * @details Inputs: none + * @details Outputs: given alarm action executed + * @param action ID of alarm action to execute * @return none *************************************************************************/ -void execServiceMode( void ) +void signalAlarmActionToServiceMode( ALARM_ACTION_T action ) { + } +/**@}*/