Index: firmware/App/Controllers/Valves.c =================================================================== diff -u -r3f2ea9e243b2c4ee4459b58348cdf74baf526c1a -rba882c318a6bedb3abe2f1fa4656dedbf2c60d9e --- firmware/App/Controllers/Valves.c (.../Valves.c) (revision 3f2ea9e243b2c4ee4459b58348cdf74baf526c1a) +++ firmware/App/Controllers/Valves.c (.../Valves.c) (revision ba882c318a6bedb3abe2f1fa4656dedbf2c60d9e) @@ -232,8 +232,7 @@ /*********************************************************************//** * @brief * The initValves function initializes the valves driver. - * @details - * Inputs: valveSelfTestState, valvesSelfTestResult, valvesStatus, + * @details Inputs: valveSelfTestState, valvesSelfTestResult, valvesStatus, * valvesControlSetBits * Outputs: valveSelfTestState, valvesSelfTestResult, valvesStatus * @return none @@ -262,9 +261,8 @@ /*********************************************************************//** * @brief * The homeValve function sets the homing request flag of a valve to TRUE. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus (The flag that sets the homing request) + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus (The flag that sets the homing request) * @param valve that is set to be homed * @return none *************************************************************************/ @@ -288,9 +286,8 @@ /*********************************************************************//** * @brief * The setValvePosition function sets the requested position of a valve. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @param valve that its position is set * @param position that the valve is set * @return returns TRUE if the requested position was legal @@ -319,9 +316,8 @@ /*********************************************************************//** * @brief * The getValvePosition function returns the current position of a valve. - * @details - * Inputs: none - * Outputs: valvesStatus + * @details Inputs: none + * @details Outputs: valvesStatus * @param valve that the position is requested * @return returns the current position of the valve in enum *************************************************************************/ @@ -345,9 +341,8 @@ * @brief * The setValveBloodTrap function set the blood trap valve to open or close * position. - * @details - * Inputs: valveAirTrapStatus - * Outputs: valveAirTrapStatus + * @details Inputs: valveAirTrapStatus + * @details Outputs: valveAirTrapStatus * @param: state enumeration of open or close for valve * @return: none *************************************************************************/ @@ -377,9 +372,8 @@ * @brief * The getValveAirTrapStatus function returns the status of air trap valve * which is either open or close - * @details - * Inputs: valveAirTrapStatus - * Outputs: none + * @details Inputs: valveAirTrapStatus + * @details Outputs: none * @return: valveAirTrapStatus the status of air trap valve (open or close) *************************************************************************/ OPN_CLS_STATE_T getValveAirTrapStatus( void ) @@ -390,9 +384,8 @@ /*********************************************************************//** * @brief * The execValvesSelfTest function executes the valves self test. - * @details - * Inputs: valveSelfTestState - * Outputs: valveSelfTestState + * @details Inputs: valveSelfTestState + * @details Outputs: valveSelfTestState * @return valvesSelfTestResult The status of the self test *************************************************************************/ SELF_TEST_STATUS_T execValvesSelfTest( void ) @@ -423,9 +416,8 @@ /*********************************************************************//** * @brief * The execValves function executes the valves exec state machine. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @return none *************************************************************************/ void execValves( void ) @@ -488,9 +480,8 @@ /*********************************************************************//** * @brief * The handleValveSelfTestEnableValves function starts the valves self test. - * @details - * Inputs: valvesSelfTestResult, valvesSelfTestResult - * Outputs: valvesSelfTestResult, valvesSelfTestResult + * @details Inputs: valvesSelfTestResult, valvesSelfTestResult + * @details Outputs: valvesSelfTestResult, valvesSelfTestResult * @return next state of the self test state machine *************************************************************************/ static VALVE_SELF_TEST_STATE_T handleValveSelfTestEnableValves( void ) @@ -516,9 +507,8 @@ * @brief * The handleValveSelfTestConfirmEnable function checks to make sure the * valves are enabled properly. - * @details - * Inputs: valvesSelfTestResult - * Outputs: valvesSelfTestResult + * @details Inputs: valvesSelfTestResult + * @details Outputs: valvesSelfTestResult * @return next state of the self test state machine *************************************************************************/ static VALVE_SELF_TEST_STATE_T handleValveSelfTestConfirmEnable( void ) @@ -540,9 +530,8 @@ /*********************************************************************//** * @brief * The handleValveStateWaitForPost function handles the wait for POST state. - * @details - * Inputs: valveSelfTestState - * Outputs: none + * @details Inputs: valveSelfTestState + * @details Outputs: none * @param valve that is waiting for POST to complete * @return next state of exec state *************************************************************************/ @@ -562,9 +551,8 @@ * @brief * The handleValveStateHomingNotStarted function handles homing not started * state of the state machine. - * @details - * Inputs: valvesStatus, valveSelfTestState, isDoorClosed - * Outputs: valvesStatus + * @details Inputs: valvesStatus, valveSelfTestState, isDoorClosed + * @details Outputs: valvesStatus * @param valve that is set to be homed * @return next state of the exec state machine *************************************************************************/ @@ -597,9 +585,8 @@ * @brief * The handleValveStateHomingFindEnergizedEdge function handles find * energized state of the state machine. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @param valve that its energized edge is found * @return next state of the exec state machine *************************************************************************/ @@ -645,9 +632,8 @@ * @brief * The handleValveStateHomingFindDeenergizedEdge function handles find * de-energized state of the state machine. - * @details. - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @param valve that its de-energized edge is found * @return next state of the exec state machine *************************************************************************/ @@ -725,9 +711,8 @@ * @brief * The handleValveStateIdle function handles the idle state of the valves * state machine. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @param valve that is in idle state * @return next state of the exec state machine *************************************************************************/ @@ -777,9 +762,8 @@ * @brief * The handleValveStateInTransition function handles the in transition * state of the state machine. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @param valve that is in position transition * @return next state of the exec state machine *************************************************************************/ @@ -833,9 +817,8 @@ * @brief * The handleValveStateInBypassMode function handles the bypass mode * state of the state machine. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @param valve that is in position transition * @return next state of the exec state machine *************************************************************************/ @@ -869,10 +852,9 @@ /*********************************************************************//** * @brief * The setValveControlMode function sets the valves control mode. - * @details - * Inputs: valvesControlSetBits, valvesControlModesSetBits, + * @details Inputs: valvesControlSetBits, valvesControlModesSetBits, * valvesControlModesResetBits - * Outputs: valvesControlSetBits + * @details Outputs: valvesControlSetBits * @param valve that its control mode is set * @param mode the control mode that the valve will be set to * @return none @@ -896,9 +878,8 @@ * @brief * The execMonitorValves function handles monitoring of the valves. The * function calls other functions to monitor the values. - * @details - * Inputs: none - * Outputs: none + * @details Inputs: none + * @details Outputs: none * @return none *************************************************************************/ static void execMonitorValves( void ) @@ -925,9 +906,8 @@ * The areValvesEnabled function checks the current valves status from FPGA * to the enable bit mask of each valve. If any of the valves is not enabled * the function raises an alarm. - * @details - * Inputs: valvesStatus, valvesControlStatusBits - * Outputs: none + * @details Inputs: valvesStatus, valvesControlStatusBits + * @details Outputs: none * @return Returns TRUE if all the valves are enabled properly *************************************************************************/ static BOOL areValvesFunctional( void ) @@ -987,9 +967,8 @@ /*********************************************************************//** * @brief * The setFPGAValue function sets the position of a valve to FPGA. - * @details - * Inputs: none - * Outputs: none + * @details Inputs: none + * @details Outputs: none * @param valve that its FPGA set point is updated * @param position that is set in counts * @param enableCurrentRelaxation flag. Indicates whether current relaxation @@ -1036,9 +1015,8 @@ * The convertAndMonitorValvesCurrent function gets the current values * in counts from FPGA and converts them to current. If any of the values * is above the threshold, the function raises an alarm. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @return none *************************************************************************/ static void convertAndMonitorValvesCurrent( void ) @@ -1089,9 +1067,8 @@ * checks whether any of the valves have deviated from their current position \n * if they are in idle state. If any of the valves have deviated, the function \n * raises an alarm. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @return none *************************************************************************/ static void getAndMonitorValvesCurrentPosition( void ) @@ -1150,9 +1127,8 @@ * @brief * The getPublishValvesDataInterval function gets the valves data publish * interval. - * @details - * Inputs: valvesDataPublishInterval - * Outputs: none + * @details Inputs: valvesDataPublishInterval + * @details Outputs: none * @return data publish time interval *************************************************************************/ U32 getPublishValvesDataInterval( void ) @@ -1171,9 +1147,8 @@ * @brief * The publishValvesData function publishes the data of the valves at the * specified time interval. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @param valve that its data is published * @return none *************************************************************************/ @@ -1205,9 +1180,8 @@ * @brief * The setValveNextStep function calculates the next step of a valve and * calls another function to set the next step. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @param valve that its next step is calculated and set * @return none *************************************************************************/ @@ -1276,9 +1250,8 @@ * The setFPGAValvePWM function checks whether the valve should be moving * CW or CCW and converts the PWM in percent to PWM in counts accordingly. * The converted PWM in counts is set via the FPGA functions. - * @details - * Inputs: valvesStatus - * Outputs: none + * @details Inputs: valvesStatus + * @details Outputs: none * @param valve which its PWM is being set * @return none *************************************************************************/ @@ -1325,9 +1298,8 @@ * @brief * The getValvesCurrentPWM function gets the PWM counts from the FPGA module * and converts them in to duty cycle in percent. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @return none *************************************************************************/ static void getValvesCurrentPWM( void ) @@ -1368,9 +1340,8 @@ * @brief * The testSetValvesDataPublishInterval function overrides the valves data * publish interval. - * @details - * Inputs: valvesDataPublishInterval - * Outputs: valvesDataPublishInterval + * @details Inputs: valvesDataPublishInterval + * @details Outputs: valvesDataPublishInterval * @param value which is override value for the valve data publish interval * @return TRUE if override successful, FALSE if not *************************************************************************/ @@ -1394,9 +1365,8 @@ * @brief * The testResetValvesDataPublishInterval function resets the override * of the valves publish interval. - * @details - * Inputs: valvesDataPublishInterval - * Outputs: valvesDataPublishInterval + * @details Inputs: valvesDataPublishInterval + * @details Outputs: valvesDataPublishInterval * @return TRUE if override reset successful, FALSE if not *************************************************************************/ BOOL testResetValvesDataPublishInterval( void ) @@ -1416,9 +1386,8 @@ /*********************************************************************//** * @brief * The testSetValvesPositionOverride function overrides the valves position. - * @details - * Inputs: valvesPositionOverride, valvesStatus - * Outputs: valvesPositionOverride + * @details Inputs: valvesPositionOverride, valvesStatus + * @details Outputs: valvesPositionOverride * @param valve to override its position * @param position of the valve that will be overridden * @return TRUE if override successful, FALSE if not @@ -1444,9 +1413,8 @@ * @brief * The testResetValvesDataPublishInterval function resets the override * of the valves publish interval. - * @details - * Inputs: valvesDataPublishInterval - * Outputs: valvesDataPublishInterval + * @details Inputs: valvesDataPublishInterval + * @details Outputs: valvesDataPublishInterval * @param valve that its data publish will be overridden * @return TRUE if override reset successful, FALSE if not *************************************************************************/ @@ -1470,9 +1438,8 @@ * @brief * The testSetValvePWMOverride function overrides the valves PWM in bypass * control mode. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @param valve to override its PWM * @param pwm in percent * @param direction of the movement of the valve in clockwise or counter @@ -1510,9 +1477,8 @@ * @brief * The testResetValvePWMOverride function resets the override PWM in bypass * control mode. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @param valve that its data publish will be overridden * @return TRUE if override reset successful, FALSE if not *************************************************************************/