Index: firmware/App/Drivers/PinchValve.h =================================================================== diff -u -r365afa6b051eb4066db3adda1eeac77149aae7ba -r4c738395b1627aa36f30c14c2e374acf0e88f5f8 --- firmware/App/Drivers/PinchValve.h (.../PinchValve.h) (revision 365afa6b051eb4066db3adda1eeac77149aae7ba) +++ firmware/App/Drivers/PinchValve.h (.../PinchValve.h) (revision 4c738395b1627aa36f30c14c2e374acf0e88f5f8) @@ -36,11 +36,11 @@ /// Valves positions typedef enum valveStatesNames { - VALVE_POSITION_NOT_IN_POSITION = 0, ///< Valve position is unknown (cannot be used as a command) - VALVE_POSITION_A_INSERT_EJECT, ///< Position A, Insert/Eject - VALVE_POSITION_B_OPEN, ///< Position B, Open - VALVE_POSITION_C_CLOSE, ///< Position C, Close - NUM_OF_VALVE_POSITIONS, ///< Number of valve positions + VALVE_POSITION_NOT_IN_POSITION = 0, ///< Valve position is unknown (cannot be used as a command) + VALVE_POSITION_A_INSERT_EJECT, ///< Position A, Insert/Eject + VALVE_POSITION_B_OPEN, ///< Position B, Open + VALVE_POSITION_C_CLOSE, ///< Position C, Close + NUM_OF_VALVE_POSITIONS, ///< Number of valve positions } VALVE_POSITION_T; /// rotary pinch valve names @@ -54,23 +54,25 @@ // ********** public function prototypes ********** -void initPinchValveDriver( void ); -void execPinchValveFunction( void ); -void execPinchValveCommand( void ); +void initPinchValveDriver( void ); ///< Initializes the pinch valve driver state, command data, and FPGA interface. +void execPinchValveFunction( void ); ///< Executes the pinch valve function state machine +void execPinchValveCommand( void ); ///< Executes the FPGA command state machine. -BOOL homePinchValve( VALVE_T valve ); -BOOL setPinchValvePosition( VALVE_T valve, VALVE_POSITION_T position ); -S32 getPinchValvePosition( VALVE_T valve ); +BOOL homePinchValve( VALVE_T valve ); ///< Starts the homing sequence for the selected pinch valve. -void setPinchValveEnableReset( VALVE_T valve, BOOL enable, BOOL reset ); -U08 getPinchValveEnableReset( VALVE_T valve ); +BOOL setPinchValvePosition( VALVE_T valve, VALVE_POSITION_T position ); ///< Starts a movement request to the selected stored valve position +S32 getPinchValvePosition( VALVE_T valve ); ///< Returns the latest actual encoder position for the selected valve. -BOOL isPinchValveBusy( VALVE_T valve ); +void setPinchValveEnableReset( VALVE_T valve, BOOL enable, BOOL reset ); ///< Sets the enable and reset control for the selected pinch valve +U08 getPinchValveEnableReset( VALVE_T valve ); ///< Returns the last enable and reset value written for the selected valve. -S32 getPinchValveStoredPosition( VALVE_T valve, VALVE_POSITION_T position ); -BOOL movePinchValveToStoredPosition( VALVE_T valve, VALVE_POSITION_T position ); +BOOL isPinchValveBusy( VALVE_T valve ); ///< Returns TRUE when the selected valve is executing or waiting for a command. +BOOL isPinchValveHomed( VALVE_T valve ); +S32 getPinchValveStoredPosition( VALVE_T valve, VALVE_POSITION_T position ); ///< Returns the stored encoder position for the selected valve position. +BOOL movePinchValveToStoredPosition( VALVE_T valve, VALVE_POSITION_T position ); ///< Starts movement to a previously stored valve position + /**@}*/ #endif