Index: firmware/App/Modes/TreatmentRecirc.c =================================================================== diff -u -rb24e96493ad0663a0589164efa3d8d8e70074574 -r5b859b160a55d1a9d8b732822a63dc570cc46072 --- firmware/App/Modes/TreatmentRecirc.c (.../TreatmentRecirc.c) (revision b24e96493ad0663a0589164efa3d8d8e70074574) +++ firmware/App/Modes/TreatmentRecirc.c (.../TreatmentRecirc.c) (revision 5b859b160a55d1a9d8b732822a63dc570cc46072) @@ -103,7 +103,7 @@ * The transitionToTreatmentRecirc function prepares for transition to treatment * re-circulate sub-mode. * @details Inputs: none - * @details Outputs: none + * @details Outputs: Re-circ sub-mode setup to begin * @return none *************************************************************************/ void transitionToTreatmentRecirc( void ) @@ -133,7 +133,8 @@ * The setupForRecirculationState function sets actuators appropriately * for recirculation state. * @details Inputs: none - * @details Outputs: none + * @details Outputs: arterial and venous lines opened, blood pump started, + * and air trap levelin control is started. * @return none *************************************************************************/ static void setupForRecirculationState( void ) @@ -171,8 +172,8 @@ * @brief * The execTreatmentRecirc function executes the Treatment circulate sub-mode * state machine. - * @details Inputs: none - * @details Outputs: none + * @details Inputs: treatmentRecircState + * @details Outputs: treatmentRecircState, recircTimerCtr * @return none *************************************************************************/ void execTreatmentRecirc( void ) @@ -203,27 +204,27 @@ * @brief * The handleRecircRecircState function handles the re-circulating state * operations. - * @details Inputs: none - * @details Outputs: none + * @details Inputs: flags + * @details Outputs: flags handled * @return next treatment re-circulation state *************************************************************************/ static TREATMENT_RECIRC_STATE_T handleRecircRecircState( void ) { TREATMENT_RECIRC_STATE_T result = TREATMENT_RECIRC_RECIRC_STATE; - // is alarm stop or user reconnect requested? + // Is alarm stop or user reconnect requested? if ( ( TRUE == recircStopRequested ) || ( TRUE == recircReconnectRequested ) ) { setupForRinsebackStopOrPause(); result = TREATMENT_RECIRC_STOPPED_STATE; } - // is end treatment requested? + // Is end treatment requested? else if ( TRUE == recircEndTreatmentRequested ) { setupForRinsebackStopOrPause(); signalRinsebackToEnd(); // signal end Tx sub-mode } - // has max time in re-circ sub-mode been exceeded? + // Has max time in re-circ sub-mode been exceeded? else if ( recircTimerCtr > RECIRC_TIMEOUT_MS ) { signalRinsebackToStopped(); @@ -237,31 +238,31 @@ * @brief * The handleRecircStoppedState function handles the re-circulation stopped * state operations. - * @details Inputs: none - * @details Outputs: none + * @details Inputs: flags + * @details Outputs: flags handled * @return next Treatment re-circulation state *************************************************************************/ static TREATMENT_RECIRC_STATE_T handleRecircStoppedState( void ) { TREATMENT_RECIRC_STATE_T result = TREATMENT_RECIRC_STOPPED_STATE; - // is back to treatment requested? + // Is back to treatment requested? if ( TRUE == recircBackToTreatmenRequested ) { signalRinsebackToStopped(); } - // is end treatment requested? + // Is end treatment requested? else if ( TRUE == recircEndTreatmentRequested ) { signalRinsebackToEnd(); } - // is re-circ resume requested? + // Is re-circ resume requested? else if ( TRUE == recircResumeRequested ) { setupForRecirculationState(); result = TREATMENT_RECIRC_RECIRC_STATE; } - // has max time in re-circ sub-mode been exceeded? + // Has max time in re-circ sub-mode been exceeded? else if ( recircTimerCtr > RECIRC_TIMEOUT_MS ) { signalRinsebackToStopped(); @@ -276,7 +277,7 @@ * The signalStopTreatmentRecirc function signals the treatment re-circulate * sub-mode to stop per an active alarm. * @details Inputs: none - * @details Outputs: none + * @details Outputs: recircStopRequested * @return none *************************************************************************/ void signalStopTreatmentRecirc( void ) @@ -289,7 +290,7 @@ * The signalTreatmentRecircUserAction function signals a re-circ user action * has been requested. The request is handled and responded to. * @details Inputs: none - * @details Outputs: none + * @details Outputs: action handled, request responded to * @param action User action requested * @return none *************************************************************************/ @@ -338,8 +339,8 @@ * The handleRecircReconnectUserAction function handles a re-circulate re-connect * user action request. It is assumed that the calling function will set * the reject reason parameter to None beforehand. - * @details Inputs: none - * @details Outputs: none + * @details Inputs: treatmentRecircState + * @details Outputs: reconnect action handled * @param rejReason Code indicating reason for rejection * @return TRUE if user action accepted, FALSE if not *************************************************************************/ @@ -365,8 +366,8 @@ * The handleRecicConfirmReconnectUserAction function handles a re-circulate * back to treatment user action request. It is assumed that the calling * function will set the reject reason parameter to None beforehand. - * @details Inputs: none - * @details Outputs: none + * @details Inputs: treatmentRecircState + * @details Outputs: confirmation of reconnection action handled * @param rejReason Code indicating reason for rejection * @return TRUE if user action accepted, FALSE if not *************************************************************************/ @@ -392,8 +393,8 @@ * The handleRecircResumeUserAction function handles a re-circulate resume * user action request. It is assumed that the calling function will set * the reject reason parameter to None beforehand. - * @details Inputs: none - * @details Outputs: none + * @details Inputs: treatmentRecircState + * @details Outputs: resumption of re-circulation action handled * @param rejReason Code indicating reason for rejection * @return TRUE if user action accepted, FALSE if not *************************************************************************/ @@ -419,8 +420,8 @@ * The handleRecircEndTreatmentUserAction function handles an e reatment * user action request. It is assumed that the calling function will set * the reject reason parameter to None beforehand. - * @details Inputs: none - * @details Outputs: none + * @details Inputs: treatmentRecircState + * @details Outputs: ending of treatment action handled * @param rejReason Code indicating reason for rejection * @return TRUE if user action accepted, FALSE if not *************************************************************************/