/************************************************************************** * * Copyright (c) 2026-2026 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 PinchValve.h * * @author (last) Varshini Nagabooshanam * @date (last) 08-Jul-2026 * * @author (original) Varshini Nagabooshanam * @date (original) 08-Jul-2026 * ***************************************************************************/ #ifndef __PINCHVALVE_H__ #define __PINCHVALVE_H__ #ifndef __PINCH_VALVE_H__ #define __PINCH_VALVE_H__ #include "TDCommon.h" /** * @defgroup PinchValve PinchValve * @brief Magellan pinch valve driver for H1 and H19. * * The PinchValve unit provides a command execution state machine for the * Magellan based pinch valve interface. FPGA register access is handled by * FpgaTD. * * @addtogroup PinchValve * @{ */ // ********** public definitions ********** // PMD IC command codes. #define PINCH_VALVE_PMD_CMD_SET_PROFILE_MODE 0x00A0 #define PINCH_VALVE_PMD_CMD_RESET_EVENT_STATUS 0x0034 #define PINCH_VALVE_PMD_CMD_SET_VELOCITY 0x0011 #define PINCH_VALVE_PMD_CMD_SET_POSITION 0x0010 #define PINCH_VALVE_PMD_CMD_UPDATE 0x001A #define PINCH_VALVE_PMD_CMD_GET_ACTIVITY_STATUS 0x00A6 #define PINCH_VALVE_PMD_CMD_GET_EVENT_STATUS 0x0031 #define PINCH_VALVE_PMD_CMD_GET_ACTUAL_POSITION 0x0037 #define PINCH_VALVE_PMD_CMD_SET_ACTUAL_POSITION 0x004D #define PINCH_VALVE_PMD_CMD_SET_OPERATING_MODE 0x0065 // ********** public function prototypes ********** void initPinchValve( void ); void execPinchValve( void ); BOOL startPinchValveHome( PINCH_VALVE_ID_T valve ); BOOL startPinchValveMove( PINCH_VALVE_ID_T valve, S32 targetPosition ); BOOL startPinchValveReadStatus( PINCH_VALVE_ID_T valve ); PINCH_VALVE_STATE_T getPinchValveState( void ); PINCH_VALVE_CMD_RESULT_T getPinchValveCommandResult( void ); void getPinchValveResponse( PINCH_VALVE_RESPONSE_T *response ); U16 getPinchValveLastOutputWord3( void ); #endif