Index: firmware/App/Controllers/AirPump.c =================================================================== diff -u -rd9b5f588d81e15ed3849222bed3362e15dbf4b0a -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Controllers/AirPump.c (.../AirPump.c) (revision d9b5f588d81e15ed3849222bed3362e15dbf4b0a) +++ firmware/App/Controllers/AirPump.c (.../AirPump.c) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -193,7 +193,7 @@ { AIR_PUMP_PAYLOAD_T data; - data.airPumpStateStatus = getAirPumpState(); + data.h12State = getAirPumpState(); broadcastData( MSG_ID_TD_AIR_PUMP_DATA, COMM_BUFFER_OUT_CAN_TD_BROADCAST, (U08*)&data, sizeof( AIR_PUMP_PAYLOAD_T ) ); airPumpDataPublicationTimerCounter = 0; Index: firmware/App/Controllers/AirPump.h =================================================================== diff -u -r3a8cf075eb6f0d255f516ac26bac7fbaacfde14a -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Controllers/AirPump.h (.../AirPump.h) (revision 3a8cf075eb6f0d255f516ac26bac7fbaacfde14a) +++ firmware/App/Controllers/AirPump.h (.../AirPump.h) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -36,7 +36,7 @@ /// Payload record structure for air pump data broadcast message typedef struct { - U32 airPumpStateStatus; ///< Air Pump state status + U32 h12State; ///< Air Pump state status } AIR_PUMP_PAYLOAD_T; /// Enumeration of air pump states. Index: firmware/App/Controllers/AirTrap.c =================================================================== diff -u -r58c82eeb7e6113e610babd4e36b3968552b35260 -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Controllers/AirTrap.c (.../AirTrap.c) (revision 58c82eeb7e6113e610babd4e36b3968552b35260) +++ firmware/App/Controllers/AirTrap.c (.../AirTrap.c) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -151,7 +151,7 @@ if ( TRUE == isAirTrapControlling() ) { pendingStopAirTrapController = TRUE; - set2WayValveState( VALVE_2_WAY_VBT, STATE_CLOSED ); // Always exit air trap valve control w/ valve closed. + set2WayValveState( H13, STATE_CLOSED ); // Always exit air trap valve control w/ valve closed. SEND_EVENT_WITH_2_U32_DATA( TD_EVENT_AIR_TRAP_FILL, STATE_CLOSED, 0 ); signalLowVenousPressureCheck(); // Venous pressure check should continue even after ending auto air trap control } @@ -202,8 +202,8 @@ } else { - lowerAirTrap = getLevelSensorState( AIR_TRAP_LEVEL_SENSOR_LOWER ); - upperAirTrap = getLevelSensorState( AIR_TRAP_LEVEL_SENSOR_UPPER ); + lowerAirTrap = getLevelSensorState( H17 ); + upperAirTrap = getLevelSensorState( H16 ); isAirTrapLevelsValid = ( ( ( AIR_TRAP_LEVEL_AIR == lowerAirTrap ) && ( AIR_TRAP_LEVEL_FLUID == upperAirTrap ) ) ? TRUE : FALSE ); #ifndef _RELEASE_ @@ -258,7 +258,7 @@ if ( MODE_FAUL == getCurrentOperationMode() ) { airTrapControllerState = AIR_TRAP_MANUAL_CONTROL_STATE; - set2WayValveState( VALVE_2_WAY_VBT, STATE_CLOSED ); + set2WayValveState( H13, STATE_CLOSED ); SEND_EVENT_WITH_2_U32_DATA( TD_EVENT_AIR_TRAP_FILL, STATE_CLOSED, 0 ); pendingStartAirTrapController = FALSE; } @@ -308,7 +308,7 @@ if ( TRUE == pendingStartAirTrapController ) { pendingStartAirTrapController = FALSE; - set2WayValveState( VALVE_2_WAY_VBT, STATE_CLOSED ); + set2WayValveState( H13, STATE_CLOSED ); SEND_EVENT_WITH_2_U32_DATA( TD_EVENT_AIR_TRAP_FILL, STATE_CLOSED, 0 ); result = AIR_TRAP_VALVE_CLOSED_STATE; } @@ -355,7 +355,7 @@ setAirPumpState( AIR_PUMP_STATE_OFF ); } - set2WayValveState( VALVE_2_WAY_VBT, STATE_OPEN ); + set2WayValveState( H13, STATE_OPEN ); fillStartTime = getMSTimerCount(); SEND_EVENT_WITH_2_U32_DATA( TD_EVENT_AIR_TRAP_FILL, STATE_OPEN, 0 ); result = AIR_TRAP_VALVE_OPEN_STATE; @@ -364,16 +364,16 @@ // Turn air pump off after defined time or air detected at upper level else if ( ( AIR_PUMP_STATE_ON == getAirPumpState() ) && ( ( TRUE == didTimeout( stopAirPumpStartTime, airPumpStopTime ) ) || - ( ( AIR_TRAP_LEVEL_AIR == getRawLevelSensorState( AIR_TRAP_LEVEL_SENSOR_UPPER ) ) && - ( AIR_TRAP_LEVEL_FLUID == getLevelSensorState( AIR_TRAP_LEVEL_SENSOR_LOWER ) ) ) ) ) + ( ( AIR_TRAP_LEVEL_AIR == getRawLevelSensorState( H16 ) ) && + ( AIR_TRAP_LEVEL_FLUID == getLevelSensorState( H17 ) ) ) ) ) { setAirPumpState( AIR_PUMP_STATE_OFF ); airPumpOnDelayStartTime = getMSTimerCount(); } // Turn on air pump if fluid reaches upper level. - else if ( AIR_TRAP_LEVEL_FLUID == getLevelSensorState( AIR_TRAP_LEVEL_SENSOR_UPPER ) ) + else if ( AIR_TRAP_LEVEL_FLUID == getLevelSensorState( H16 ) ) { if ( ( AIR_PUMP_STATE_OFF == getAirPumpState() ) && ( TRUE == didTimeout( airPumpOnDelayStartTime, AIR_PUMP_ON_DELAY_TIME_MS ) ) ) @@ -385,15 +385,15 @@ } // Transition to open valve state when air detected at lower level - else if ( ( AIR_TRAP_LEVEL_AIR == getLevelSensorState( AIR_TRAP_LEVEL_SENSOR_UPPER ) ) && - ( AIR_TRAP_LEVEL_AIR == getLevelSensorState( AIR_TRAP_LEVEL_SENSOR_LOWER ) ) ) + else if ( ( AIR_TRAP_LEVEL_AIR == getLevelSensorState( H16 ) ) && + ( AIR_TRAP_LEVEL_AIR == getLevelSensorState( H17 ) ) ) { if ( AIR_PUMP_STATE_ON == getAirPumpState() ) { setAirPumpState( AIR_PUMP_STATE_OFF ); } - set2WayValveState( VALVE_2_WAY_VBT, STATE_OPEN ); + set2WayValveState( H13, STATE_OPEN ); fillStartTime = getMSTimerCount(); SEND_EVENT_WITH_2_U32_DATA( TD_EVENT_AIR_TRAP_FILL, STATE_OPEN, 0 ); result = AIR_TRAP_VALVE_OPEN_STATE; @@ -422,9 +422,9 @@ result = AIR_TRAP_MANUAL_CONTROL_STATE; } // Transition to closed valve state when fluid detected at upper level - else if ( AIR_TRAP_LEVEL_FLUID == getRawLevelSensorState( AIR_TRAP_LEVEL_SENSOR_UPPER ) ) + else if ( AIR_TRAP_LEVEL_FLUID == getRawLevelSensorState( H16 ) ) { - set2WayValveState( VALVE_2_WAY_VBT, STATE_CLOSED ); + set2WayValveState( H13, STATE_CLOSED ); airPumpOnDelayStartTime = u32DiffWithWrap( AIR_PUMP_ON_DELAY_ADJUST_AFTER_FILL, getMSTimerCount() ); signalLowVenousPressureCheck(); SEND_EVENT_WITH_2_U32_DATA( TD_EVENT_AIR_TRAP_FILL, STATE_CLOSED, 0 ); @@ -450,11 +450,11 @@ { AIR_TRAP_PAYLOAD_T data; - data.lowerLevel = getLevelSensorState( AIR_TRAP_LEVEL_SENSOR_LOWER ); - data.upperLevel = getLevelSensorState( AIR_TRAP_LEVEL_SENSOR_UPPER ); - data.rawLowerLevel = getRawLevelSensorState( AIR_TRAP_LEVEL_SENSOR_LOWER ); - data.rawUpperLevel = getRawLevelSensorState( AIR_TRAP_LEVEL_SENSOR_UPPER ); - data.valveState = get2WayValveState( VALVE_2_WAY_VBT ); + data.h17State = getLevelSensorState( H17 ); + data.h16State = getLevelSensorState( H16 ); + data.h17RawState = getRawLevelSensorState( H17 ); + data.h16RawState = getRawLevelSensorState( H16 ); + data.h13State = get2WayValveState( H13 ); data.controlling = isAirTrapControlling(); broadcastData( MSG_ID_TD_AIR_TRAP_DATA, COMM_BUFFER_OUT_CAN_TD_BROADCAST, (U08*)&data, sizeof( AIR_TRAP_PAYLOAD_T ) ); Index: firmware/App/Controllers/AirTrap.h =================================================================== diff -u -rd9b5f588d81e15ed3849222bed3362e15dbf4b0a -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Controllers/AirTrap.h (.../AirTrap.h) (revision d9b5f588d81e15ed3849222bed3362e15dbf4b0a) +++ firmware/App/Controllers/AirTrap.h (.../AirTrap.h) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -36,11 +36,11 @@ /// Payload record structure for air trap data broadcast message typedef struct { - U32 lowerLevel; ///< Lower air trap level sensor state - U32 upperLevel; ///< Upper air trap level sensor state - U32 rawLowerLevel; ///< Raw Lower air trap level sensor state - U32 rawUpperLevel; ///< Raw Upper air trap level sensor state - U32 valveState; ///< Is air trap valve open or closed + U32 h17State; ///< Lower air trap level sensor state + U32 h16State; ///< Upper air trap level sensor state + U32 h17RawState; ///< Raw Lower air trap level sensor state + U32 h16RawState; ///< Raw Upper air trap level sensor state + U32 h13State; ///< Is air trap valve open or closed BOOL controlling; ///< Flag indicates whether air trap level is being auto controlled } AIR_TRAP_PAYLOAD_T; Index: firmware/App/Controllers/BloodFlow.c =================================================================== diff -u -r2c8dd22b5f4e0b51b551fa419b8e0d1a8a201fbb -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision 2c8dd22b5f4e0b51b551fa419b8e0d1a8a201fbb) +++ firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -803,22 +803,22 @@ TD_OP_MODE_T opMode = getCurrentOperationMode(); U32 hallSensor = 0; // TODO gioGetBit( hetPORT1, BP_ROTOR_HALL_SENSOR_NHET_ID ); - payload.setFlowRate = targetBloodFlowRate; - payload.measFlow = getMeasuredBloodFlowRate(); - payload.measRotorSpd = getMeasuredBloodPumpRotorSpeed(); - payload.measPumpSpd = getMeasuredBloodPumpSpeed(); - payload.measCurr = 0.0F; // TODO getMeasuredBloodPumpMCCurrent(); - payload.setRPM = bloodPumpSetSpeedRPM; - payload.rotorCount = getBloodPumpRotorCount(); + payload.h4SetFlowRate = targetBloodFlowRate; + payload.h4MeasFlow = getMeasuredBloodFlowRate(); + payload.h4MeasRotorSpd = getMeasuredBloodPumpRotorSpeed(); + payload.h4MeasPumpSpd = getMeasuredBloodPumpSpeed(); + payload.h4MeasCurr = 0.0F; // TODO getMeasuredBloodPumpMCCurrent(); + payload.h4SetRPM = bloodPumpSetSpeedRPM; + payload.h4RotorCount = getBloodPumpRotorCount(); // if ( ( MODE_PRET == opMode ) || ( MODE_TREA == opMode ) || ( MODE_POST == opMode ) ) // { // prescribed flow only available in treatment modes // payload.presFlow = getTreatmentParameterU32( TREATMENT_PARAM_BLOOD_FLOW ); // TODO - restore when Tx Param Mode implemented // } // else { - payload.presFlow = 0; + payload.h4PresFlow = 0; } - payload.rotorHall = ( hallSensor > 0 ? 0 : 1 ); // 1=home, 0=not home + payload.h4RotorHallState = ( hallSensor > 0 ? 0 : 1 ); // 1=home, 0=not home broadcastData( MSG_ID_TD_BLOOD_PUMP_DATA, COMM_BUFFER_OUT_CAN_TD_BROADCAST, (U08*)&payload, sizeof( BLOOD_PUMP_STATUS_PAYLOAD_T ) ); bloodFlowDataPublicationTimerCounter = 0; } Index: firmware/App/Controllers/BloodFlow.h =================================================================== diff -u -r5dea4d2934a06e63b87c74732d5d5d7756bdc62a -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Controllers/BloodFlow.h (.../BloodFlow.h) (revision 5dea4d2934a06e63b87c74732d5d5d7756bdc62a) +++ firmware/App/Controllers/BloodFlow.h (.../BloodFlow.h) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -14,71 +14,71 @@ * @date (original) 25-Oct-2024 * ***************************************************************************/ - -#ifndef __BLOOD_FLOW_H__ -#define __BLOOD_FLOW_H__ - + +#ifndef __BLOOD_FLOW_H__ +#define __BLOOD_FLOW_H__ + #include "TDCommon.h" -#include "PeristalticPump.h" - -/** - * @defgroup BloodFlow BloodFlow - * @brief Blood Pump & Blood Flow controller/monitor module. Monitors and - * controls the blood pump. - * - * @addtogroup BloodFlow - * @{ - */ - -// ********** public definitions ********** - -#define MAX_SET_BLOOD_FLOW_RATE 500 ///< Maximum prescribed blood flow rate (in mL/min). +#include "PeristalticPump.h" + +/** + * @defgroup BloodFlow BloodFlow + * @brief Blood Pump & Blood Flow controller/monitor module. Monitors and + * controls the blood pump. + * + * @addtogroup BloodFlow + * @{ + */ + +// ********** public definitions ********** + +#define MAX_SET_BLOOD_FLOW_RATE 500 ///< Maximum prescribed blood flow rate (in mL/min). #define MIN_SET_BLOOD_FLOW_RATE 100 ///< Minimum prescribed blood flow rate (in mL/min). /// Payload record structure for a blood pump data message. typedef struct { - S32 setFlowRate; ///< Set flow rate in mL/min. - F32 measFlow; ///< Measured flow rate in mL/min. - F32 measRotorSpd; ///< Measured rotor speed in RPM. - F32 measPumpSpd; ///< Measured pump speed in RPM. - F32 measCurr; ///< Measure motor current in Amps. - F32 setRPM; ///< Set motor speed in RPM. - U32 rotorCount; ///< Rotor count. - U32 presFlow; ///< Prescribed blood flow in mL/min. - U32 rotorHall; ///< Rotor hall state (1=home, 0=not home). + S32 h4SetFlowRate; ///< Set flow rate in mL/min. + F32 h4MeasFlow; ///< Measured flow rate in mL/min. + F32 h4MeasRotorSpd; ///< Measured rotor speed in RPM. + F32 h4MeasPumpSpd; ///< Measured pump speed in RPM. + F32 h4MeasCurr; ///< Measure motor current in Amps. + F32 h4SetRPM; ///< Set motor speed in RPM. + U32 h4RotorCount; ///< Rotor count. + U32 h4PresFlow; ///< Prescribed blood flow in mL/min. + U32 h4RotorHallState; ///< Rotor hall state (1=home, 0=not home). } BLOOD_PUMP_STATUS_PAYLOAD_T; -// ********** public function prototypes ********** - -void initBloodFlow( void ); +// ********** public function prototypes ********** + +void initBloodFlow( void ); void execBloodFlowMonitor( void ); -void execBloodFlowController( void ); - +void execBloodFlowController( void ); + BOOL setBloodPumpTargetFlowRate( U32 flowRate, MOTOR_DIR_T dir, PUMP_CONTROL_MODE_T mode ); -BOOL setBloodPumpTargetRPM( U32 rpm, MOTOR_DIR_T dir ); -void signalBloodPumpHardStop( void ); -void signalBloodPumpRotorHallSensor( void ); +BOOL setBloodPumpTargetRPM( U32 rpm, MOTOR_DIR_T dir ); +void signalBloodPumpHardStop( void ); +void signalBloodPumpRotorHallSensor( void ); BOOL homeBloodPump( void ); BOOL isBloodPumpRunning( void ); BOOL isBloodPumpRampComplete( void ); -void resetBloodPumpRotorCount( void ); - -SELF_TEST_STATUS_T execBloodFlowTest( void ); +void resetBloodPumpRotorCount( void ); -S32 getTargetBloodFlowRate( void ); -F32 getMeasuredBloodFlowRate( void ); +SELF_TEST_STATUS_T execBloodFlowTest( void ); + +S32 getTargetBloodFlowRate( void ); +F32 getMeasuredBloodFlowRate( void ); F32 getMeasuredBloodPumpRotorSpeed( void ); F32 getMeasuredBloodPumpSpeed( void ); -BOOL testBloodFlowDataPublishIntervalOverride( MESSAGE_T *message ); +BOOL testBloodFlowDataPublishIntervalOverride( MESSAGE_T *message ); BOOL testSetTargetBloodFlowRateOverride( MESSAGE_T *message ); -BOOL testSetBloodPumpSpeedOverride( MESSAGE_T *message ); -BOOL testMeasuredBloodFlowRateOverride( MESSAGE_T *message ); -BOOL testMeasuredBloodPumpRotorSpeedOverride( MESSAGE_T *message ); -BOOL testMeasuredBloodPumpSpeedOverride( MESSAGE_T *message ); +BOOL testSetBloodPumpSpeedOverride( MESSAGE_T *message ); +BOOL testMeasuredBloodFlowRateOverride( MESSAGE_T *message ); +BOOL testMeasuredBloodPumpRotorSpeedOverride( MESSAGE_T *message ); +BOOL testMeasuredBloodPumpSpeedOverride( MESSAGE_T *message ); BOOL testBloodPumpRotorCountOverride( MESSAGE_T *message ); - -/**@}*/ - -#endif + +/**@}*/ + +#endif Index: firmware/App/Controllers/Valves.c =================================================================== diff -u -r051326e2671e8d5b3e99eaa109ea549e94a929f3 -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Controllers/Valves.c (.../Valves.c) (revision 051326e2671e8d5b3e99eaa109ea549e94a929f3) +++ firmware/App/Controllers/Valves.c (.../Valves.c) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -80,14 +80,14 @@ /// Payload record structure for pinch valve set position request typedef struct { - U32 valve; ///< which pinch valve to set (0=VBA, 1=VBV) + U32 valve; ///< which pinch valve to set (0=H1, 1=H19) U32 pos; ///< 1=A, 2=B, 3=C } VALVE_PINCH_SET_CMD_PAYLOAD_T; /// Payload record structure for pinch valve home request typedef struct { - U32 valve; ///< which pinch valve to home (0=VBA, 1=VBV) + U32 valve; ///< which pinch valve to home (0=H1, 1=H19) BOOL force; ///< Flag indicates whether home should be forced to happen even if already homed. BOOL tubing; ///< Flag indicates whether tubing will be present. } VALVE_PINCH_HOME_CMD_PAYLOAD_T; Index: firmware/App/Drivers/BubbleDetector.c =================================================================== diff -u -rd9b5f588d81e15ed3849222bed3362e15dbf4b0a -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Drivers/BubbleDetector.c (.../BubbleDetector.c) (revision d9b5f588d81e15ed3849222bed3362e15dbf4b0a) +++ firmware/App/Drivers/BubbleDetector.c (.../BubbleDetector.c) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -15,40 +15,40 @@ * ***************************************************************************/ -#include "BubbleDetector.h" +#include "BubbleDetector.h" #include "FpgaTD.h" -#include "Messaging.h" - +#include "Messaging.h" + /** * @addtogroup BubbleDetector * @{ */ -// ********** private definitions ********** - +// ********** private definitions ********** -// ********** private data ********** - + +// ********** private data ********** + /// Current bubble detected states (overrideable). static OVERRIDE_U32_T currentBubbleState[ NUM_OF_BUBBLE_DETECTORS ]; - + // ********** private function prototypes ********** -/*********************************************************************//** - * @brief - * The initBubbleDetector function initializes the BubbleDetector unit. - * @details \b Inputs: none - * @details \b Outputs: Bubble Detector unit is initialized. - * @return none - *************************************************************************/ +/*********************************************************************//** + * @brief + * The initBubbleDetector function initializes the BubbleDetector unit. + * @details \b Inputs: none + * @details \b Outputs: Bubble Detector unit is initialized. + * @return none + *************************************************************************/ void initBubbleDetector( void ) { - currentBubbleState[ BUBBLE_DETECTOR_ADV ].data = NO_BUBBLE_DETECTED; - currentBubbleState[ BUBBLE_DETECTOR_ADV ].ovData = NO_BUBBLE_DETECTED; - currentBubbleState[ BUBBLE_DETECTOR_ADV ].ovInitData = NO_BUBBLE_DETECTED; - currentBubbleState[ BUBBLE_DETECTOR_ADV ].override = OVERRIDE_RESET; -} - + currentBubbleState[ H18 ].data = NO_BUBBLE_DETECTED; + currentBubbleState[ H18 ].ovData = NO_BUBBLE_DETECTED; + currentBubbleState[ H18 ].ovInitData = NO_BUBBLE_DETECTED; + currentBubbleState[ H18 ].override = OVERRIDE_RESET; +} + /*********************************************************************//** * @brief * The readBubbleDetector function gets the current bubble detected state @@ -63,20 +63,20 @@ { BOOL bubble; - bubble = ADVBubbleDetected(); // read current sensor state from FPGA - currentBubbleState[ BUBBLE_DETECTOR_ADV ].data = (U32)( FALSE == bubble ? NO_BUBBLE_DETECTED : BUBBLE_DETECTED ); + bubble = H18BubbleDetected(); // read current sensor state from FPGA + currentBubbleState[ H18 ].data = (U32)( FALSE == bubble ? NO_BUBBLE_DETECTED : BUBBLE_DETECTED ); } -/*********************************************************************//** - * @brief +/*********************************************************************//** + * @brief * The getBubbleDetectedState function gets the current bubble detected state * for a given bubble detector sensor. - * @details \b Alarm: ALARM_ID_TD_SOFTWARE_FAULT if given sensor is invalid. - * @details \b Inputs: currentBubbleState[] - * @details \b Outputs: none - * @param sensor ID of bubble detector sensor to get state for. - * @return The current state of the given bubble detector sensor. - *************************************************************************/ + * @details \b Alarm: ALARM_ID_TD_SOFTWARE_FAULT if given sensor is invalid. + * @details \b Inputs: currentBubbleState[] + * @details \b Outputs: none + * @param sensor ID of bubble detector sensor to get state for. + * @return The current state of the given bubble detector sensor. + *************************************************************************/ BUBBLE_STATE_T getBubbleDetectedState( BUBBLE_DETECTOR_T sensor ) { BUBBLE_STATE_T result = NO_BUBBLE_DETECTED; @@ -94,7 +94,7 @@ SET_ALARM_WITH_2_U32_DATA( ALARM_ID_TD_SOFTWARE_FAULT, SW_FAULT_ID_BUBBLE_DETECTOR_INVALID_SENSOR, sensor ) } - return result; + return result; } @@ -119,5 +119,5 @@ return result; } - + /**@}*/ Index: firmware/App/Drivers/BubbleDetector.h =================================================================== diff -u -r494b19c85bdea2b8fc273c648b4f1955f9d07dc3 -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Drivers/BubbleDetector.h (.../BubbleDetector.h) (revision 494b19c85bdea2b8fc273c648b4f1955f9d07dc3) +++ firmware/App/Drivers/BubbleDetector.h (.../BubbleDetector.h) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -14,12 +14,12 @@ * @date (original) 22-Aug-2024 * ***************************************************************************/ - -#ifndef __BUBBLE_DETECTOR_H__ -#define __BUBBLE_DETECTOR_H__ - + +#ifndef __BUBBLE_DETECTOR_H__ +#define __BUBBLE_DETECTOR_H__ + #include "TDCommon.h" - + /** * @defgroup BubbleDetector BubbleDetector * @brief The Bubble Detector unit provides low-level functions for interfacing @@ -29,12 +29,12 @@ * @{ */ -// ********** public definitions ********** - +// ********** public definitions ********** + /// Enumeration of bubble detector sensors. typedef enum Bubble_Detectors { - BUBBLE_DETECTOR_ADV = 0, ///< ADV - Venous bubble detector. + H18 = 0, ///< H18: Venous bubble detector. NUM_OF_BUBBLE_DETECTORS ///< Number of used internal ADC channels. } BUBBLE_DETECTOR_T; @@ -46,14 +46,14 @@ NUM_OF_BUBBLE_DETECTION_STATES ///< Number of bubble detection states. } BUBBLE_STATE_T; -// ********** public function prototypes ********** - -void initBubbleDetector( void ); +// ********** public function prototypes ********** + +void initBubbleDetector( void ); void readBubbleDetectors( void ); BUBBLE_STATE_T getBubbleDetectedState( BUBBLE_DETECTOR_T sensor ); BOOL testBubbleDetectOverride( MESSAGE_T *message ); - + /**@}*/ -#endif +#endif Index: firmware/App/Drivers/LevelSensors.c =================================================================== diff -u -r58c82eeb7e6113e610babd4e36b3968552b35260 -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Drivers/LevelSensors.c (.../LevelSensors.c) (revision 58c82eeb7e6113e610babd4e36b3968552b35260) +++ firmware/App/Drivers/LevelSensors.c (.../LevelSensors.c) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -15,36 +15,36 @@ * ***************************************************************************/ -#include "LevelSensors.h" +#include "LevelSensors.h" #include "FpgaTD.h" #include "Messaging.h" #include "TaskPriority.h" -#include "Timers.h" - +#include "Timers.h" + /** * @addtogroup LevelSensors * @{ */ -// ********** private definitions ********** - +// ********** private definitions ********** + #define AIR_TRAP_LEVEL_DEBOUNCE_TIME_MS ( 400 / TASK_PRIORITY_INTERVAL ) ///< Air trap level sensor debounce time (in priority task intervals). -// ********** private data ********** +// ********** private data ********** static OVERRIDE_U32_T rawLevelStates[ NUM_OF_AIR_TRAP_LEVEL_SENSORS ]; ///< Raw air trap level states before debounce (overrideable). static OVERRIDE_U32_T currentLevelStates[ NUM_OF_AIR_TRAP_LEVEL_SENSORS ]; ///< Current raw level sensor states (overrideable). static U32 airTrapLevelsDebounceTimerCtr[ NUM_OF_AIR_TRAP_LEVEL_SENSORS ]; ///< Debounce timer counter for air trap level sensors. - + // ********** private function prototypes ********** -/*********************************************************************//** - * @brief - * The initLevelSensors function initializes the Level Sensors unit. - * @details \b Inputs: none - * @details \b Outputs: Level Sensors unit is initialized. - * @return none - *************************************************************************/ +/*********************************************************************//** + * @brief + * The initLevelSensors function initializes the Level Sensors unit. + * @details \b Inputs: none + * @details \b Outputs: Level Sensors unit is initialized. + * @return none + *************************************************************************/ void initLevelSensors( void ) { AIR_TRAP_LEVEL_SENSORS_T airTrapLevelSensor; @@ -61,8 +61,8 @@ currentLevelStates[ airTrapLevelSensor ].ovInitData = AIR_TRAP_LEVEL_AIR; currentLevelStates[ airTrapLevelSensor ].override = OVERRIDE_RESET; } -} - +} + /*********************************************************************//** * @brief * The readLevelSensors function gets the current level sensor state @@ -81,8 +81,8 @@ // Get latest raw level sensor states from FPGA getFPGAAirTrapLevels( &lowAir, &highAir ); - currentLevelStates[ AIR_TRAP_LEVEL_SENSOR_LOWER ].data = (U32)( FALSE == lowAir ? AIR_TRAP_LEVEL_FLUID : AIR_TRAP_LEVEL_AIR ); - currentLevelStates[ AIR_TRAP_LEVEL_SENSOR_UPPER ].data = (U32)( FALSE == highAir ? AIR_TRAP_LEVEL_FLUID : AIR_TRAP_LEVEL_AIR ); + currentLevelStates[ H17 ].data = (U32)( FALSE == lowAir ? AIR_TRAP_LEVEL_FLUID : AIR_TRAP_LEVEL_AIR ); + currentLevelStates[ H16 ].data = (U32)( FALSE == highAir ? AIR_TRAP_LEVEL_FLUID : AIR_TRAP_LEVEL_AIR ); // Debounce raw air trap level sensor readings for( airTrapLevelSensor = AIR_TRAP_LEVEL_FIRST; airTrapLevelSensor < NUM_OF_AIR_TRAP_LEVEL_SENSORS; airTrapLevelSensor++ ) @@ -104,16 +104,16 @@ } } -/*********************************************************************//** - * @brief +/*********************************************************************//** + * @brief * The getLevelSensorState function gets the current debounced sensor state * for a given level sensor. - * @details \b Alarm: ALARM_ID_TD_SOFTWARE_FAULT if given sensor is invalid. - * @details \b Inputs: currentLevelStates[] - * @details \b Outputs: none - * @param sensor ID of level sensor to get state for. - * @return The current state of the given level sensor. - *************************************************************************/ + * @details \b Alarm: ALARM_ID_TD_SOFTWARE_FAULT if given sensor is invalid. + * @details \b Inputs: currentLevelStates[] + * @details \b Outputs: none + * @param sensor ID of level sensor to get state for. + * @return The current state of the given level sensor. + *************************************************************************/ AIR_TRAP_LEVELS_T getLevelSensorState( AIR_TRAP_LEVEL_SENSORS_T sensor ) { AIR_TRAP_LEVELS_T result = AIR_TRAP_LEVEL_AIR; @@ -131,7 +131,7 @@ SET_ALARM_WITH_2_U32_DATA( ALARM_ID_TD_SOFTWARE_FAULT, SW_FAULT_ID_LEVEL_SENSOR_INVALID_SENSOR, sensor ) } - return result; + return result; } /*********************************************************************//** @@ -203,5 +203,5 @@ return result; } - + /**@}*/ Index: firmware/App/Drivers/LevelSensors.h =================================================================== diff -u -rd9b5f588d81e15ed3849222bed3362e15dbf4b0a -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Drivers/LevelSensors.h (.../LevelSensors.h) (revision d9b5f588d81e15ed3849222bed3362e15dbf4b0a) +++ firmware/App/Drivers/LevelSensors.h (.../LevelSensors.h) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -14,12 +14,12 @@ * @date (original) 03-Oct-2024 * ***************************************************************************/ - -#ifndef __LEVEL_SENSORS_H__ -#define __LEVEL_SENSORS_H__ - + +#ifndef __LEVEL_SENSORS_H__ +#define __LEVEL_SENSORS_H__ + #include "TDCommon.h" - + /** * @defgroup LevelSensors LevelSensors * @brief The Level sensors unit provides low-level functions to monitor a @@ -29,15 +29,15 @@ * @{ */ -// ********** public definitions ********** - +// ********** public definitions ********** + /// Enumeration of air trap level sensors monitored by this module. typedef enum AirTrapLevelSensors { - AIR_TRAP_LEVEL_SENSOR_LOWER = 0, ///< Lower air trap sensor - AIR_TRAP_LEVEL_FIRST = AIR_TRAP_LEVEL_SENSOR_LOWER, ///< First air trap level sensor - AIR_TRAP_LEVEL_SENSOR_UPPER, ///< Upper air trap sensor - NUM_OF_AIR_TRAP_LEVEL_SENSORS ///< Number of air trap sensors + H17 = 0, ///< Lower air trap sensor + AIR_TRAP_LEVEL_FIRST = H17, ///< First air trap level sensor + H16, ///< Upper air trap sensor + NUM_OF_AIR_TRAP_LEVEL_SENSORS ///< Number of air trap sensors } AIR_TRAP_LEVEL_SENSORS_T; /// Enumeration of air trap level sensor levels. @@ -48,16 +48,16 @@ NUM_OF_AIR_TRAP_LEVELS ///< Number of air trap level sensor levels } AIR_TRAP_LEVELS_T; -// ********** public function prototypes ********** - -void initLevelSensors( void ); +// ********** public function prototypes ********** + +void initLevelSensors( void ); void readLevelSensors( void ); AIR_TRAP_LEVELS_T getLevelSensorState( AIR_TRAP_LEVEL_SENSORS_T sensor ); AIR_TRAP_LEVELS_T getRawLevelSensorState( AIR_TRAP_LEVEL_SENSORS_T sensor ); BOOL testRawLevelSensorOverride( MESSAGE_T *message ); BOOL testLevelSensorOverride( MESSAGE_T *message ); - + /**@}*/ -#endif +#endif Index: firmware/App/Drivers/PeristalticPump.c =================================================================== diff -u -r56100135135bb715d316b5fd002a4a4951b9334a -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Drivers/PeristalticPump.c (.../PeristalticPump.c) (revision 56100135135bb715d316b5fd002a4a4951b9334a) +++ firmware/App/Drivers/PeristalticPump.c (.../PeristalticPump.c) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -28,15 +28,15 @@ // ********** private definitions ********** #define MAX_PUMP_SPEED_RPM 3080U ///< Maximum speed (in RPM) that a peristaltic pump can be set to. -#define BP_PUMP_CMD_GAIN 0.9F ///< Gain for blood pump commanded RPM that must be applied before sending to FPGA. -#define BP_PUMP_CMD_OFFSET 80.0F ///< Offset for blood pump commanded RPM that must be applied before sending to FPGA. -#define BP_PUMP_CMD_CAL(r) ((r) * BP_PUMP_CMD_GAIN + BP_PUMP_CMD_OFFSET ) ///< Macro to calibrate a commanded blood pump RPM before sending to FPGA. +#define H4_PUMP_CMD_GAIN 0.9F ///< Gain for blood pump commanded RPM that must be applied before sending to FPGA. +#define H4_PUMP_CMD_OFFSET 80.0F ///< Offset for blood pump commanded RPM that must be applied before sending to FPGA. +#define H4_PUMP_CMD_CAL(r) ((r) * H4_PUMP_CMD_GAIN + H4_PUMP_CMD_OFFSET ) ///< Macro to calibrate a commanded blood pump RPM before sending to FPGA. -#define BP_PERIOD_SEC 0.00001F ///< Blood pump feedback period in seconds. -#define BP_HZ_TO_RPM_SCALAR 10.0F ///< Blood pump Hz to RPM scalar. -#define BP_PERIOD_TO_HZ(p) ( 1.0F / (F32)((S32)(p) * BP_PERIOD_SEC) ) ///< Blood pump period to Hz conversion macro. -#define BP_HZ_TO_RPM(h) ((h) * BP_HZ_TO_RPM_SCALAR) ///< Blood pump Hz to RPM conversion macro. -#define BP_ZERO_SPEED_PERIOD 0xFFFF ///< Blood pump period reported when pump is stopped. +#define H4_PERIOD_SEC 0.00001F ///< Blood pump feedback period in seconds. +#define H4_HZ_TO_RPM_SCALAR 10.0F ///< Blood pump Hz to RPM scalar. +#define H4_PERIOD_TO_HZ(p) ( 1.0F / (F32)((S32)(p) * H4_PERIOD_SEC) ) ///< Blood pump period to Hz conversion macro. +#define H4_HZ_TO_RPM(h) ((h) * H4_HZ_TO_RPM_SCALAR) ///< Blood pump Hz to RPM conversion macro. +#define H4_ZERO_SPEED_PERIOD 0xFFFF ///< Blood pump period reported when pump is stopped. // ********** private data ********** @@ -63,10 +63,10 @@ pumpMeasSpeedRPM.ovInitData = 0.0F; pumpMeasSpeedRPM.override = OVERRIDE_RESET; - setBPDirection( MOTOR_DIR_FORWARD ); - resetBPHomeRequest(); - setBPSetSpeed( 0 ); - setBPEnabled( TRUE ); + setH4Direction( MOTOR_DIR_FORWARD ); + resetH4HomeRequest(); + setH4SetSpeed( 0 ); + setH4Enabled( TRUE ); } /*********************************************************************//** @@ -81,12 +81,12 @@ *************************************************************************/ void readPeristalticPumps( void ) { - U16 period = getBPPeriod(); - F32 Hz = BP_PERIOD_TO_HZ(period); - F32 rpm = BP_HZ_TO_RPM(Hz); + U16 period = getH4Period(); + F32 Hz = H4_PERIOD_TO_HZ(period); + F32 rpm = H4_HZ_TO_RPM(Hz); // update measured pump speed - if ( period != BP_ZERO_SPEED_PERIOD ) + if ( period != H4_ZERO_SPEED_PERIOD ) { if ( pumpSetSpeedRPM < 0 ) // TODO - can we get a real measured direction to base measured speed sign on? { @@ -106,7 +106,7 @@ if ( TRUE == pumpHomeRequested ) { pumpHomeRequested = FALSE; - resetBPHomeRequest(); + resetH4HomeRequest(); } } @@ -120,7 +120,7 @@ void cmdPeristalticPumpHome( void ) { pumpHomeRequested = TRUE; - homeBP(); + homeH4(); } /*********************************************************************//** @@ -140,7 +140,7 @@ if ( abs( rpm ) < MAX_PUMP_SPEED_RPM ) { - F32 calRpm = BP_PUMP_CMD_CAL( (F32)rpm ); + F32 calRpm = H4_PUMP_CMD_CAL( (F32)rpm ); U16 setRpm = (U16)( abs( (S32)calRpm ) ); MOTOR_DIR_T dir = MOTOR_DIR_FORWARD; @@ -149,8 +149,8 @@ dir = MOTOR_DIR_REVERSE; } pumpSetSpeedRPM = rpm; - setBPDirection( dir ); - setBPSetSpeed( setRpm ); + setH4Direction( dir ); + setH4SetSpeed( setRpm ); result = TRUE; } else Index: firmware/App/Drivers/PressureSensor.c =================================================================== diff -u -r56100135135bb715d316b5fd002a4a4951b9334a -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Drivers/PressureSensor.c (.../PressureSensor.c) (revision 56100135135bb715d316b5fd002a4a4951b9334a) +++ firmware/App/Drivers/PressureSensor.c (.../PressureSensor.c) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -118,26 +118,26 @@ *************************************************************************/ void readPressureSensors( void ) { - U16 PBA = getPBAPressure(); - U16 PBO = getPBOPressure(); + U16 h2 = getH2Pressure(); + U16 h14 = getH14Pressure(); // Update status of pressure sensors - currentPressureStatus[ PRESSURE_SENSOR_ARTERIAL ] = getPressureStatusFromFPGARegReading( PBA ); - currentPressureStatus[ PRESSURE_SENSOR_VENOUS ] = getPressureStatusFromFPGARegReading( PBO ); + currentPressureStatus[ H2 ] = getPressureStatusFromFPGARegReading( h2 ); + currentPressureStatus[ H14 ] = getPressureStatusFromFPGARegReading( h14 ); // Update and convert raw pressures to mmHg - currentPressureReadings[ PRESSURE_SENSOR_ARTERIAL ].data = convertPressureRdg2mmHg( PBA ); - currentPressureReadings[ PRESSURE_SENSOR_VENOUS ].data = convertPressureRdg2mmHg( PBO ); + currentPressureReadings[ H2 ].data = convertPressureRdg2mmHg( h2 ); + currentPressureReadings[ H14 ].data = convertPressureRdg2mmHg( h14 ); // Update and convert raw pressure sensor temperatures to deg C - currentPresTempReadings[ PRESSURE_SENSOR_ARTERIAL ].data = convertPressureTempReading2DegC( getPBATemperature() ); - currentPresTempReadings[ PRESSURE_SENSOR_VENOUS ].data = convertPressureTempReading2DegC( getPBOTemperature() ); + currentPresTempReadings[ H2 ].data = convertPressureTempReading2DegC( getH2Temperature() ); + currentPresTempReadings[ H14 ].data = convertPressureTempReading2DegC( getH14Temperature() ); // Update read and error counters for each pressure sensor - lastPressureReadCounter[ PRESSURE_SENSOR_ARTERIAL ].data = (U32)getPBAReadCounter(); - lastPressureReadCounter[ PRESSURE_SENSOR_VENOUS ].data = (U32)getPBOReadCounter(); - lastPressureErrorCounter[ PRESSURE_SENSOR_ARTERIAL ].data = (U32)getPBAErrorCounter(); - lastPressureErrorCounter[ PRESSURE_SENSOR_VENOUS ].data = (U32)getPBAErrorCounter(); + lastPressureReadCounter[ H2 ].data = (U32)getH2ReadCounter(); + lastPressureReadCounter[ H14 ].data = (U32)getH14ReadCounter(); + lastPressureErrorCounter[ H2 ].data = (U32)getH2ErrorCounter(); + lastPressureErrorCounter[ H14 ].data = (U32)getH14ErrorCounter(); // Monitor pressure sensor health checkPressureSensors(); @@ -196,17 +196,17 @@ *************************************************************************/ static void checkPressureSensors( void ) { - checkFPGAPersistentAlarms( FPGA_PERS_ERROR_ARTERIAL_PRESSURE_SENSOR, getPressureSensorReadCount( PRESSURE_SENSOR_ARTERIAL ) ); - checkFPGAPersistentAlarms( FPGA_PERS_ERROR_VENOUS_PRESSURE_SESNOR, getPressureSensorReadCount( PRESSURE_SENSOR_VENOUS ) ); - checkFPGAPersistentErrorCountAlarm( FPGA_PERS_ERROR_ARTERIAL_PRESSURE_SENSOR, getPressureSensorErrorCount( PRESSURE_SENSOR_ARTERIAL ) ); - checkFPGAPersistentErrorCountAlarm( FPGA_PERS_ERROR_VENOUS_PRESSURE_SESNOR, getPressureSensorErrorCount( PRESSURE_SENSOR_VENOUS ) ); + checkFPGAPersistentAlarms( FPGA_PERS_ERROR_ARTERIAL_PRESSURE_SENSOR, getPressureSensorReadCount( H2 ) ); + checkFPGAPersistentAlarms( FPGA_PERS_ERROR_VENOUS_PRESSURE_SESNOR, getPressureSensorReadCount( H14 ) ); + checkFPGAPersistentErrorCountAlarm( FPGA_PERS_ERROR_ARTERIAL_PRESSURE_SENSOR, getPressureSensorErrorCount( H2 ) ); + checkFPGAPersistentErrorCountAlarm( FPGA_PERS_ERROR_VENOUS_PRESSURE_SESNOR, getPressureSensorErrorCount( H14 ) ); // verify status of pressure sensors - if ( currentPressureStatus[ PRESSURE_SENSOR_ARTERIAL ] != PRESSURE_NORMAL_OP ) + if ( currentPressureStatus[ H2 ] != PRESSURE_NORMAL_OP ) { // TODO - alarm? } - if ( currentPressureStatus[ PRESSURE_SENSOR_ARTERIAL ] != PRESSURE_NORMAL_OP ) + if ( currentPressureStatus[ H14 ] != PRESSURE_NORMAL_OP ) { // TODO - alarm? } Index: firmware/App/Drivers/PressureSensor.h =================================================================== diff -u -rd9b5f588d81e15ed3849222bed3362e15dbf4b0a -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Drivers/PressureSensor.h (.../PressureSensor.h) (revision d9b5f588d81e15ed3849222bed3362e15dbf4b0a) +++ firmware/App/Drivers/PressureSensor.h (.../PressureSensor.h) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -14,12 +14,12 @@ * @date (original) 22-Aug-2024 * ***************************************************************************/ - -#ifndef __PRESSURE_SENSOR_H__ -#define __PRESSURE_SENSOR_H__ - -#include "TDCommon.h" - + +#ifndef __PRESSURE_SENSOR_H__ +#define __PRESSURE_SENSOR_H__ + +#include "TDCommon.h" + /** * @defgroup PressureSensor PressureSensor * @brief The Pressure Sensor unit provides low-level functions for interfacing @@ -29,27 +29,27 @@ * @{ */ -// ********** public definitions ********** - +// ********** public definitions ********** + /// Enumeration of pressure sensors monitored by this unit. typedef enum PressureSensors { - PRESSURE_SENSOR_ARTERIAL = 0, ///< Arterial blood line pressure sensor - PRESSURE_SENSOR_VENOUS, ///< Vensous blood line pressure sensor + H2 = 0, ///< Arterial blood line pressure sensor + H14, ///< Vensous blood line pressure sensor NUM_OF_PRESSURE_SENSORS ///< Number of pressure sensors } PRESSURE_SENSORS_T; - -// ********** public function prototypes ********** - + +// ********** public function prototypes ********** + void initPressureSensor( void ); void readPressureSensors( void ); F32 getPressure( PRESSURE_SENSORS_T sensor ); F32 getPressureSensorTemperature( PRESSURE_SENSORS_T sensor ); U32 getPressureSensorReadCount( PRESSURE_SENSORS_T sensor ); U32 getPressureSensorErrorCount( PRESSURE_SENSORS_T sensor ); - + BOOL testPressureSensorOverride( MESSAGE_T *message ); /**@}*/ -#endif +#endif Index: firmware/App/Drivers/RotaryValve.c =================================================================== diff -u -rb692af0986725e87431ca5e23c5721f1b242baac -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Drivers/RotaryValve.c (.../RotaryValve.c) (revision b692af0986725e87431ca5e23c5721f1b242baac) +++ firmware/App/Drivers/RotaryValve.c (.../RotaryValve.c) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -40,7 +40,7 @@ /// Payload record structure for rotary valve set position request typedef struct { - U32 valve; ///< which rotary valve to set position for (0=VBA, 1=VBV) + U32 valve; ///< which rotary valve to set position for (0=H1, 1=H19) S16 stepChange; ///< number of steps to change position (pos indicates CW, neg indicates CCW) } VALVE_ROTARY_SET_CMD_PAYLOAD_T; #pragma pack(pop) @@ -83,8 +83,8 @@ } // set valve control bits once at startup - setVBAControl( valveControl[ VBA ] ); - setVBVControl( valveControl[ VBV ] ); + setH1Control( valveControl[ H1 ] ); + setH19Control( valveControl[ H19 ] ); } /*********************************************************************//** @@ -105,12 +105,12 @@ S16 cmdPos[ NUM_OF_VALVES ]; // Get latest valve status and positions from FPGA - cmdPos[ VBV ] = getVBVCmdPosition(); - currentValveEncPosition[ VBV ].data = (S32)getValveEncoderPosition( VBV ); - valveStatus[ VBV ].data = getVBVStatus(); - cmdPos[ VBA ] = getVBACmdPosition(); - currentValveEncPosition[ VBA ].data = (S32)getValveEncoderPosition( VBA ); - valveStatus[ VBA ].data = getVBAStatus(); + cmdPos[ H19 ] = getH19CmdPosition(); + currentValveEncPosition[ H19 ].data = (S32)getValveEncoderPosition( H19 ); + valveStatus[ H19 ].data = getH19Status(); + cmdPos[ H1 ] = getH1CmdPosition(); + currentValveEncPosition[ H1 ].data = (S32)getValveEncoderPosition( H1 ); + valveStatus[ H1 ].data = getH1Status(); // TODO check commanded position vs. commanded position read back from FPGA - alarm different for some persistent period of time @@ -155,31 +155,31 @@ mag = (S16)(abs(chg)); // give FPGA valve change command commandValvePosChange[ valve ] = chg; - if ( VBA == valve ) + if ( H1 == valve ) { - ctrl = getVBAControl(); + ctrl = getH1Control(); if ( MOTOR_DIR_REVERSE == dir ) { - setVBAControl( ( ctrl | FPGA_PINCH_VALVES_REVERSE ) ); + setH1Control( ( ctrl | FPGA_PINCH_VALVES_REVERSE ) ); } else { - setVBAControl( ( ctrl & ~FPGA_PINCH_VALVES_REVERSE ) ); + setH1Control( ( ctrl & ~FPGA_PINCH_VALVES_REVERSE ) ); } - setVBAPosition( mag ); + setH1Position( mag ); } else { - ctrl = getVBVControl(); + ctrl = getH19Control(); if ( MOTOR_DIR_REVERSE == dir ) { - setVBVControl( ( ctrl | FPGA_PINCH_VALVES_REVERSE ) ); + setH19Control( ( ctrl | FPGA_PINCH_VALVES_REVERSE ) ); } else { - setVBVControl( ( ctrl & ~FPGA_PINCH_VALVES_REVERSE ) ); + setH19Control( ( ctrl & ~FPGA_PINCH_VALVES_REVERSE ) ); } - setVBVPosition( mag ); + setH19Position( mag ); } } else Index: firmware/App/Drivers/RotaryValve.h =================================================================== diff -u -rd9b5f588d81e15ed3849222bed3362e15dbf4b0a -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Drivers/RotaryValve.h (.../RotaryValve.h) (revision d9b5f588d81e15ed3849222bed3362e15dbf4b0a) +++ firmware/App/Drivers/RotaryValve.h (.../RotaryValve.h) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -41,9 +41,9 @@ /// rotary pinch valve names typedef enum valveNames { - VBA = 0, ///< Arterial rotary pinch valve - FIRST_VALVE = VBA, ///< First valve - VBV, ///< Venous rotary pinch valve + H1 = 0, ///< Arterial rotary pinch valve + FIRST_VALVE = H1, ///< First valve + H19, ///< Venous rotary pinch valve NUM_OF_VALVES ///< Number of valves } VALVE_T; Index: firmware/App/Drivers/Valve2Way.c =================================================================== diff -u -rb692af0986725e87431ca5e23c5721f1b242baac -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Drivers/Valve2Way.c (.../Valve2Way.c) (revision b692af0986725e87431ca5e23c5721f1b242baac) +++ firmware/App/Drivers/Valve2Way.c (.../Valve2Way.c) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -51,8 +51,8 @@ void init2WayValves(void) { // Close all 2-way valves - current2WayValveStates[ VALVE_2_WAY_VBT ] = STATE_CLOSED; - setVBTValveState( STATE_CLOSED ); + current2WayValveStates[ H13 ] = STATE_CLOSED; + setH13ValveState( STATE_CLOSED ); } /*********************************************************************//** @@ -70,12 +70,12 @@ { if ( ( valve < NUM_OF_2_WAY_VALVES ) && ( state < NUM_OF_OPN_CLS_STATES ) ) { - if ( VALVE_2_WAY_VBT == valve ) + if ( H13 == valve ) { // if state is changing, set the valve to the given open/closed state if ( state != current2WayValveStates[ valve ] ) { - setVBTValveState( state ); + setH13ValveState( state ); current2WayValveStates[ valve ] = state; } } Index: firmware/App/Drivers/Valve2Way.h =================================================================== diff -u -rb692af0986725e87431ca5e23c5721f1b242baac -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Drivers/Valve2Way.h (.../Valve2Way.h) (revision b692af0986725e87431ca5e23c5721f1b242baac) +++ firmware/App/Drivers/Valve2Way.h (.../Valve2Way.h) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -36,7 +36,7 @@ /// 2 way valve names typedef enum valves2WayNames { - VALVE_2_WAY_VBT = 0, ///< Air trap relief valve + H13 = 0, ///< Air trap relief valve NUM_OF_2_WAY_VALVES ///< Number of 2 way valves } VALVE_2_WAY_T; Index: firmware/App/Modes/ModeFault.c =================================================================== diff -u -rd9550bb105d13131646ff75859de549b51af6abe -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Modes/ModeFault.c (.../ModeFault.c) (revision d9550bb105d13131646ff75859de549b51af6abe) +++ firmware/App/Modes/ModeFault.c (.../ModeFault.c) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -109,8 +109,8 @@ // Ensure all valves are in safe position // setValveAirTrap( STATE_CLOSED ); -// setValvePosition( VBA, VALVE_POSITION_C_CLOSE ); -// setValvePosition( VBV, VALVE_POSITION_C_CLOSE ); +// setValvePosition( H1, VALVE_POSITION_C_CLOSE ); +// setValvePosition( H19, VALVE_POSITION_C_CLOSE ); // If DG not stopped, stop it // if ( DG_MODE_GENE == dgOperationMode ) Index: firmware/App/Modes/ModeService.c =================================================================== diff -u -r380b0afc95467d0861ff3aa2cdcde5d5d7ac85e7 -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Modes/ModeService.c (.../ModeService.c) (revision 380b0afc95467d0861ff3aa2cdcde5d5d7ac85e7) +++ firmware/App/Modes/ModeService.c (.../ModeService.c) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -72,8 +72,8 @@ // setAirPumpState( AIR_PUMP_STATE_OFF ); // setValveAirTrap( STATE_CLOSED ); -// setValvePosition( VBA, VALVE_POSITION_A_INSERT_EJECT ); -// setValvePosition( VBV, VALVE_POSITION_A_INSERT_EJECT ); +// setValvePosition( H1, VALVE_POSITION_A_INSERT_EJECT ); +// setValvePosition( H19, VALVE_POSITION_A_INSERT_EJECT ); return 0; } Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -r3a8cf075eb6f0d255f516ac26bac7fbaacfde14a -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 3a8cf075eb6f0d255f516ac26bac7fbaacfde14a) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -79,8 +79,8 @@ // Set valves to default positions // setValveAirTrap( STATE_CLOSED ); -// setValvePosition( VBA, VALVE_POSITION_A_INSERT_EJECT ); -// setValvePosition( VBV, VALVE_POSITION_A_INSERT_EJECT ); +// setValvePosition( H1, VALVE_POSITION_A_INSERT_EJECT ); +// setValvePosition( H19, VALVE_POSITION_A_INSERT_EJECT ); // doorClosedRequired( FALSE, FALSE ); // door no longer required to be closed in standby mode // syringeDetectionRequired( FALSE ); @@ -278,8 +278,8 @@ // // // Set valves to safe positions // setValveAirTrap( STATE_CLOSED ); -// setValvePosition( VBA, VALVE_POSITION_C_CLOSE ); -// setValvePosition( VBV, VALVE_POSITION_C_CLOSE ); +// setValvePosition( H1, VALVE_POSITION_C_CLOSE ); +// setValvePosition( H19, VALVE_POSITION_C_CLOSE ); // } break; Index: firmware/App/Monitors/Bubbles.c =================================================================== diff -u -r3a8cf075eb6f0d255f516ac26bac7fbaacfde14a -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Monitors/Bubbles.c (.../Bubbles.c) (revision 3a8cf075eb6f0d255f516ac26bac7fbaacfde14a) +++ firmware/App/Monitors/Bubbles.c (.../Bubbles.c) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -225,7 +225,7 @@ bubblesSelfTestRequested[ bubble ] = FALSE; bubblesSelfTestStatus[ bubble ] = SELF_TEST_STATUS_IN_PROGRESS; - if ( BUBBLE_DETECTOR_ADV == bubble ) + if ( H18 == bubble ) { setFPGAVenousBubbleSelfTest(); } @@ -261,7 +261,7 @@ if ( BUBBLE_DETECTED == getBubbleDetectedState( bubble ) ) // Faked air bubble caused { bubblesSelfTestStatus[ bubble ] = SELF_TEST_STATUS_PASSED; - if ( BUBBLE_DETECTOR_ADV == bubble ) + if ( H18 == bubble ) { clearFPGAVenousBubbleSelfTest(); } @@ -305,8 +305,8 @@ { BUBBLES_DATA_T bubbleData; - bubbleData.statusADV = (U32)getBubbleDetectedState( BUBBLE_DETECTOR_ADV ); - bubbleData.stateADV = (U32)bubblesState[ BUBBLE_DETECTOR_ADV ]; + bubbleData.statusH18 = (U32)getBubbleDetectedState( H18 ); + bubbleData.stateH18 = (U32)bubblesState[ H18 ]; broadcastData( MSG_ID_TD_BUBBLES_DATA, COMM_BUFFER_OUT_CAN_TD_BROADCAST, (U08*)&bubbleData, sizeof( BUBBLES_DATA_T ) ); bubblesDataPublicationTimerCounter = 0; } Index: firmware/App/Monitors/Bubbles.h =================================================================== diff -u -r494b19c85bdea2b8fc273c648b4f1955f9d07dc3 -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Monitors/Bubbles.h (.../Bubbles.h) (revision 494b19c85bdea2b8fc273c648b4f1955f9d07dc3) +++ firmware/App/Monitors/Bubbles.h (.../Bubbles.h) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -37,8 +37,8 @@ /// Bubble detectors data publish typedef struct { - U32 statusADV; ///< Venous bubble detector status - U32 stateADV; ///< Venous bubble detector state + U32 statusH18; ///< Venous bubble detector status + U32 stateH18; ///< Venous bubble detector state } BUBBLES_DATA_T; // ********** public function prototypes ********** Index: firmware/App/Monitors/Pressures.c =================================================================== diff -u -r56100135135bb715d316b5fd002a4a4951b9334a -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Monitors/Pressures.c (.../Pressures.c) (revision 56100135135bb715d316b5fd002a4a4951b9334a) +++ firmware/App/Monitors/Pressures.c (.../Pressures.c) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -520,8 +520,8 @@ static PRESSURE_STATE_T handlePressureContReadState( void ) { PRESSURE_STATE_T result = PRESSURE_CONTINUOUS_READ_STATE; - F32 fpgaArtPres = getPressure( PRESSURE_SENSOR_ARTERIAL ) - arterialPressureOffset; - F32 fpgaVenPres = getPressure( PRESSURE_SENSOR_VENOUS ) - venousPressureOffset; + F32 fpgaArtPres = getPressure( H2 ) - arterialPressureOffset; + F32 fpgaVenPres = getPressure( H14 ) - venousPressureOffset; // Filter inline pressure readings filterInlinePressureReadings( fpgaArtPres, fpgaVenPres ); @@ -966,15 +966,15 @@ { PRESSURE_DATA_T data; - data.arterialPressure = getFilteredArterialPressure(); - data.venousPressure = getFilteredVenousPressure(); + data.h2Pressure = getFilteredArterialPressure(); + data.h14Pressure = getFilteredVenousPressure(); data.presLimitState = currPresLimitsState; - data.artMinLimit = currentArterialMinLimit; - data.artMaxLimit = currentArterialMaxLimit; - data.venMinLimit = currentVenousMinLimit; - data.venMaxLimit = currentVenousMaxLimit; - data.arterialLongFilterPres = longFilteredArterialPressure; - data.venousLongFilterPres = longFilteredVenousPressure; + data.h2MinLimit = currentArterialMinLimit; + data.h2MaxLimit = currentArterialMaxLimit; + data.h14MinLimit = currentVenousMinLimit; + data.h14MaxLimit = currentVenousMaxLimit; + data.h2LongFilterPres = longFilteredArterialPressure; + data.h14LongFilterPres = longFilteredVenousPressure; broadcastData( MSG_ID_TD_PRESSURE_DATA, COMM_BUFFER_OUT_CAN_TD_BROADCAST, (U08*)&data, sizeof( PRESSURE_DATA_T ) ); pressureDataPublicationTimerCounter = 0; Index: firmware/App/Monitors/Pressures.h =================================================================== diff -u -ra91074d04b607deabe4fbf714d40e9d191590359 -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Monitors/Pressures.h (.../Pressures.h) (revision a91074d04b607deabe4fbf714d40e9d191590359) +++ firmware/App/Monitors/Pressures.h (.../Pressures.h) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -56,15 +56,15 @@ /// Payload record structure for the pressure data message. typedef struct { - F32 arterialPressure; ///< Latest arterial pressure (mmHg) - F32 venousPressure; ///< Latest venous pressure (mmHg) - U32 presLimitState; ///< Current pressure limits state (enum-stabilization or stable) - S32 artMinLimit; ///< Current arterial minimum pressure limit (mmHg) - S32 artMaxLimit; ///< Current arterial maximum pressure limit (mmHg) - S32 venMinLimit; ///< Current venous minimum pressure limit (mmHg) - S32 venMaxLimit; ///< Current venous maximum pressure limit (mmHg) - F32 arterialLongFilterPres; ///< Latest long filtered arterial pressure (mmHg) - F32 venousLongFilterPres; ///< Latest long filtered venous pressure (mmHg) + F32 h2Pressure; ///< Latest arterial pressure (mmHg) + F32 h14Pressure; ///< Latest venous pressure (mmHg) + U32 presLimitState; ///< Current pressure limits state (enum-stabilization or stable) + S32 h2MinLimit; ///< Current arterial minimum pressure limit (mmHg) + S32 h2MaxLimit; ///< Current arterial maximum pressure limit (mmHg) + S32 h14MinLimit; ///< Current venous minimum pressure limit (mmHg) + S32 h14MaxLimit; ///< Current venous maximum pressure limit (mmHg) + F32 h2LongFilterPres; ///< Latest long filtered arterial pressure (mmHg) + F32 h14LongFilterPres; ///< Latest long filtered venous pressure (mmHg) } PRESSURE_DATA_T; // ********** public function prototypes ********** Index: firmware/App/Services/FpgaTD.c =================================================================== diff -u -r56100135135bb715d316b5fd002a4a4951b9334a -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Services/FpgaTD.c (.../FpgaTD.c) (revision 56100135135bb715d316b5fd002a4a4951b9334a) +++ firmware/App/Services/FpgaTD.c (.../FpgaTD.c) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -45,11 +45,11 @@ #define MAX_FPGA_COMM_FAILURES 3 ///< FPGA maximum comm failures per MAX_FPGA_COMM_FAILURES_WINDOW_MS #define MIN_POWER_ON_TIME_FOR_COMM_FAILS ( 1 * MS_PER_SECOND ) ///< Allow FPGA comm errors for first second after power-up -#define FPGA_BP_ENABLE_BIT_MASK 0x01 ///< Bit mask for enabling the blood pump. -#define FPGA_BP_DIRECTION_REV_BIT_MASK 0x02 ///< Bit mask for setting the blood pump direction. -#define FPGA_BP_HOME_BIT_MASK 0x04 ///< Bit mask for requesting a blood pump home operation. +#define FPGA_H4_ENABLE_BIT_MASK 0x01 ///< Bit mask for enabling the blood pump. +#define FPGA_H4_DIRECTION_REV_BIT_MASK 0x02 ///< Bit mask for setting the blood pump direction. +#define FPGA_H4_HOME_BIT_MASK 0x04 ///< Bit mask for requesting a blood pump home operation. -#define FPGA_VBT_OPEN_BIT_MASK 0x01 ///< Bit mask for setting VBT valve position to open. +#define FPGA_H13_OPEN_BIT_MASK 0x01 ///< Bit mask for setting H13 valve position to open. #define FPGA_INPUT_VOLTAGE_SCALE 3.0F ///< FPGA source and aux voltage. #define FPGA_PVN_VOLTAGE_SCALE 1.0F ///< FPGA pvn voltage. @@ -62,11 +62,11 @@ #define FRONT_DOOR_SWITCH_MASK 0x0010 ///< Front door switch bit mask. Bit 4 of the GPIO register. #define PUMP_TRACK_SWITCH_MASK 0x0020 ///< Pump track switch bit mask. Bit 5 of the GPIO register. -#define FPGA_AIRTRAP_LEVEL_LOW_MASK 0x0008 ///< Bit mask for air trap lower level sensor. -#define FPGA_AIRTRAP_LEVEL_HIGH_MASK 0x0004 ///< Bit mask for air trap upper level sensor. +#define FPGA_AIRTRAP_LEVEL_LOW_H17_MASK 0x0008 ///< Bit mask for air trap lower level sensor. +#define FPGA_AIRTRAP_LEVEL_HIGH_H16_MASK 0x0004 ///< Bit mask for air trap upper level sensor. -#define FPGA_ADV_BUBBLE_STATUS_MASK 0x0002 ///< Bit mask for venous air bubble detector input status. -#define FPGA_ADV_BUBBLE_SELF_TEST_CMD 0x08 ///< Bit for venous air bubble detector self-test command. +#define FPGA_H18_BUBBLE_STATUS_MASK 0x0002 ///< Bit mask for venous air bubble detector input status. +#define FPGA_H18_BUBBLE_SELF_TEST_CMD 0x08 ///< Bit for venous air bubble detector self-test command. // FPGA Sensors Record #pragma pack(push,1) @@ -90,27 +90,27 @@ U08 BPHallStatus; ///< Reg 261. BP hall sensor status. U16 sPumpDACSet; ///< Reg 262. Syringe pump DAC setting. U16 sPumpDACEEProm; ///< Reg 264. Syringe pump DAC EEProm data. - U16 PBoPressure; ///< Reg 266. PBo raw pressure data. - S16 PBoTemperature; ///< Reg 268. PBo raw temperature data. - U08 PBoReadCount; ///< Reg 270. PBo read count. - U08 PBoErrorCount; ///< Reg 271. PBo error count. - U16 PBAPressure; ///< Reg 272. PBA raw pressure data. - S16 PBATemperature; ///< Reg 274. PBA raw temperature data. - U08 PBAReadCount; ///< Reg 276. PBA read count. - U08 PBAErrorCount; ///< Reg 277. PBA error count. - S16 VBACmdPosition; ///< Reg 278. VBA commanded position (200 steps/rev). - S16 VBAEncPosition; ///< Reg 280. VBA encoder position (1024 counts/rev). - U08 VBAStatus; ///< Reg 282. VBA status. + U16 h14Pressure; ///< Reg 266. H14 raw pressure data. + S16 h14Temperature; ///< Reg 268. H14 raw temperature data. + U08 h14ReadCount; ///< Reg 270. H14 read count. + U08 h14ErrorCount; ///< Reg 271. H14 error count. + U16 h2Pressure; ///< Reg 272. H2 raw pressure data. + S16 h2Temperature; ///< Reg 274. H2 raw temperature data. + U08 h2ReadCount; ///< Reg 276. H2 read count. + U08 h2ErrorCount; ///< Reg 277. H2 error count. + S16 H1CmdPosition; ///< Reg 278. H1 commanded position (200 steps/rev). + S16 H1EncPosition; ///< Reg 280. H1 encoder position (1024 counts/rev). + U08 H1Status; ///< Reg 282. H1 status. U08 reserved4; ///< Reg 283. Reserved and available for future use. U08 BEMStatus; ///< Reg 284. BEM status. U08 BEMEncStatus; ///< Reg 285. BEM encoder status. S32 BEMEncPosition; ///< Reg 286. BEM encoder position. - S16 BPPeriod; ///< Reg 290. BP measured period (10 uSec). - S16 BPTorque; ///< Reg 292. BP measured torque. - S16 BPSpeedFromHall; ///< Reg 294. BP measured speed from hall sensor(s). - S16 VBVCmdPosition; ///< Reg 296. VBV commanded position (200 steps/rev). - S16 VBVEncPosition; ///< Reg 298. VBV encoder position (1024 counts/rev). - U08 VBVStatus; ///< Reg 300. VBV status. + S16 H4Period; ///< Reg 290. H4 measured period (10 uSec). + S16 H4Torque; ///< Reg 292. H4 measured torque. + S16 H4SpeedFromHall; ///< Reg 294. H4 measured speed from hall sensor(s). + S16 H19CmdPosition; ///< Reg 296. H19 commanded position (200 steps/rev). + S16 H19EncPosition; ///< Reg 298. H19 encoder position (1024 counts/rev). + U08 H19Status; ///< Reg 300. H19 status. U08 BPStatus; ///< Reg 301. BP status. U16 GPIOReg; ///< Reg 302. GPIO register. U08 HEPStatus; ///< Reg 304. HEP status register. @@ -136,28 +136,28 @@ S16 ACPower3Current; ///< Reg 340. AC power current - 3. S16 ACPower3Voltage; ///< Reg 342. AC power voltage - 3. S32 ACHeaterTemp; ///< Reg 344. AC heater temperature. - U16 BPRotorHallSpeed; ///< Reg 348. BP rotor speed from hall sensor. + U16 H4RotorHallSpeed; ///< Reg 348. H4 rotor speed from hall sensor. } FPGA_SENSORS_T; /// Record structure for FPGA continuous priority writes. typedef struct { U16 fpgaGenWrRd; ///< Reg 04. FPGA general write/read-back register (mirrored to a general read register in read page at addr 256). - U08 VBTControl; ///< Reg 06. VBT valve control register. - U08 VBTPWMEnable; ///< Reg 07. VBT valve PWM enable register. - U16 VBTPWMLowPeriod; ///< Reg 08. VBT PWM low signal period register. - U16 VBTPWMPeriod; ///< Reg 10. VBT PWM period register. - U16 VBTPWMPUllInTime; ///< Reg 12. VBT PWM pull in time register. - U08 ATAPControl; ///< Reg 14. Air pump control register. - U08 BEMControl; ///< Reg 15. Blood ejector stepper motor control register. - U16 BEMSetSpeed; ///< Reg 16. Blood ejector stepper motor step register. - U16 BPSetSpeed; ///< Reg 18. Blood pump speed set register (RPM). - U08 BPControl; ///< Reg 20. Blood pump control register. - U08 VBVControl; ///< Reg 21. VBV control register. - U16 VBVPosition; ///< Reg 22. VBV position set register (200 steps/rev). - U16 VBAPosition; ///< Reg 24. VBA position set register (200 steps/rev). - U08 VBAControl; ///< Reg 26. VBA control register. - U08 valveEncoderControl; ///< Reg 27. VBA/VBV encoder control register. + U08 h13Control; ///< Reg 06. H13 valve control register. + U08 h13PWMEnable; ///< Reg 07. H13 valve PWM enable register. + U16 h13PWMLowPeriod; ///< Reg 08. H13 PWM low signal period register. + U16 h13PWMPeriod; ///< Reg 10. H13 PWM period register. + U16 h13PWMPUllInTime; ///< Reg 12. H13 PWM pull in time register. + U08 h12Control; ///< Reg 14. H12 Air pump control register. + U08 h5Control; ///< Reg 15. H5 ejector stepper motor control register. + U16 h5SetSpeed; ///< Reg 16. H5 ejector stepper motor step register. + U16 H4SetSpeed; ///< Reg 18. H4 Blood pump speed set register (RPM). + U08 H4Control; ///< Reg 20. H4 Blood pump control register. + U08 H19Control; ///< Reg 21. H19 control register. + U16 H19Position; ///< Reg 22. H19 position set register (200 steps/rev). + U16 H1Position; ///< Reg 24. H1 position set register (200 steps/rev). + U08 H1Control; ///< Reg 26. H1 control register. + U08 valveEncoderControl; ///< Reg 27. H1/H19 encoder control register. U08 alarmControl; ///< Reg 28. Alarm audio control register. } FPGA_ACTUATORS_T; @@ -194,9 +194,9 @@ memset( &fpgaActuatorSetPoints, 0, sizeof(FPGA_ACTUATORS_T) ); fpgaActuatorSetPoints.alarmControl = (U08)MIN_ALARM_VOLUME_ATTENUATION << 2; // Start alarm audio volume at maximum - // Set VBA and VBV to default configuration + disabled so they do not run immediately on power up - fpgaActuatorSetPoints.VBAControl = FPGA_PINCH_VALVES_1_32_STEP | FPGA_PINCH_VALVES_DISABLE | FPGA_PINCH_VALVES_NOT_RESET | FPGA_PINCH_VALVES_NOT_SLEEP; - fpgaActuatorSetPoints.VBVControl = FPGA_PINCH_VALVES_1_32_STEP | FPGA_PINCH_VALVES_DISABLE | FPGA_PINCH_VALVES_NOT_RESET | FPGA_PINCH_VALVES_NOT_SLEEP; + // Set H1 and H19 to default configuration + disabled so they do not run immediately on power up + fpgaActuatorSetPoints.H1Control = FPGA_PINCH_VALVES_1_32_STEP | FPGA_PINCH_VALVES_DISABLE | FPGA_PINCH_VALVES_NOT_RESET | FPGA_PINCH_VALVES_NOT_SLEEP; + fpgaActuatorSetPoints.H19Control = FPGA_PINCH_VALVES_1_32_STEP | FPGA_PINCH_VALVES_DISABLE | FPGA_PINCH_VALVES_NOT_RESET | FPGA_PINCH_VALVES_NOT_SLEEP; // initialize FPGA comm failures windowed timer count initTimeWindowedCount( TIME_WINDOWED_COUNT_FPGA_COMM_FAILURES, MAX_FPGA_COMM_FAILURES, MAX_FPGA_COMM_FAILURES_WINDOW_MS); @@ -405,28 +405,28 @@ /*********************************************************************//** * @brief - * The setBPEnabled function enables or disables the blood pump per + * The setH4Enabled function enables or disables the blood pump per * the given flag. * @details \b Inputs: none * @details \b Outputs: Blood pump enabled or disabled (bit 0 of BP control register) * @param enable TRUE if BP enable is requested, FALSE if BP disable is requested * @return none *************************************************************************/ -void setBPEnabled( BOOL enable ) +void setH4Enabled( BOOL enable ) { if ( TRUE == enable ) { - fpgaActuatorSetPoints.BPControl |= FPGA_BP_ENABLE_BIT_MASK; + fpgaActuatorSetPoints.H4Control |= FPGA_H4_ENABLE_BIT_MASK; } else { - fpgaActuatorSetPoints.BPControl &= ~((U08)FPGA_BP_ENABLE_BIT_MASK); + fpgaActuatorSetPoints.H4Control &= ~((U08)FPGA_H4_ENABLE_BIT_MASK); } } /*********************************************************************//** * @brief - * The setBPDirection function sets the direction for the blood pump + * The setH4Direction function sets the direction for the blood pump * motor to the given direction. * @details \b Inputs: none * @details \b Outputs: Blood pump motor direction is set (bit 1 of BP control register). @@ -435,71 +435,71 @@ * @param dir the desired direction for the blood pump motor (fwd or rev) * @return none *************************************************************************/ -void setBPDirection( MOTOR_DIR_T dir ) +void setH4Direction( MOTOR_DIR_T dir ) { if ( MOTOR_DIR_REVERSE == dir ) { - fpgaActuatorSetPoints.BPControl |= FPGA_BP_DIRECTION_REV_BIT_MASK; + fpgaActuatorSetPoints.H4Control |= FPGA_H4_DIRECTION_REV_BIT_MASK; } else { - fpgaActuatorSetPoints.BPControl &= ~((U08)FPGA_BP_DIRECTION_REV_BIT_MASK); + fpgaActuatorSetPoints.H4Control &= ~((U08)FPGA_H4_DIRECTION_REV_BIT_MASK); } } /*********************************************************************//** * @brief - * The homeBP function sets the bit requesting that the blood pump + * The homeH4 function sets the bit requesting that the blood pump * be homed. * @details \b Inputs: none - * @details \b Outputs: BP home request is set (bit 2 of BP control register). + * @details \b Outputs: H4 pump home request is set (bit 2 of H4 control register). * @return none *************************************************************************/ -void homeBP( void ) +void homeH4( void ) { - fpgaActuatorSetPoints.BPControl |= FPGA_BP_HOME_BIT_MASK; + fpgaActuatorSetPoints.H4Control |= FPGA_H4_HOME_BIT_MASK; } /*********************************************************************//** * @brief - * The resetBPHomeRequest function resets the fpga blood pump home + * The resetH4HomeRequest function resets the fpga blood pump home * request. * @note This function should be called after request is made and transmission * to FPGA is complete. * @details \b Inputs: none - * @details \b Outputs: BP home request is cleared (bit 2 of BP control register) + * @details \b Outputs: H4 pump home request is cleared (bit 2 of H4 control register) * @return none *************************************************************************/ -void resetBPHomeRequest( void ) +void resetH4HomeRequest( void ) { - fpgaActuatorSetPoints.BPControl &= ~((U08)FPGA_BP_HOME_BIT_MASK); + fpgaActuatorSetPoints.H4Control &= ~((U08)FPGA_H4_HOME_BIT_MASK); } /*********************************************************************//** * @brief - * The setBPSetSpeed function sets the fpga blood pump set speed + * The setH4SetSpeed function sets the fpga blood pump set speed * to the given speed (0..3000 RPM). * @details \b Inputs: none - * @details \b Outputs: BP set speed is set - * @param rpm the set point for the BP speed (in RPM). + * @details \b Outputs: H4 set speed is set + * @param rpm the set point for the H4 pump speed (in RPM). * @return none *************************************************************************/ -void setBPSetSpeed( U16 rpm ) +void setH4SetSpeed( U16 rpm ) { - fpgaActuatorSetPoints.BPSetSpeed = rpm; + fpgaActuatorSetPoints.H4SetSpeed = rpm; } /*********************************************************************//** * @brief - * The getBPPeriod function gets the latest blood pump period (in 10uSec) + * The getH4Period function gets the latest blood pump period (in 10uSec) * from the FPGA. * @details \b Inputs: fpgaSensorReadings * @details \b Outputs: none * @return Latest blood pump period. *************************************************************************/ -U16 getBPPeriod( void ) +U16 getH4Period( void ) { - return fpgaSensorReadings.BPPeriod; + return fpgaSensorReadings.H4Period; } /*********************************************************************//** @@ -551,110 +551,110 @@ /*********************************************************************//** * @brief - * The getPBAPressure function gets the latest arterial pressure reading. + * The getH2Pressure function gets the latest arterial pressure reading. * The high 2 bits are status bits: 00=ok, 01=cmd mode, 10=stale data, 11=diag * The low 14 bits are data. Zero is at 1638. Values above are positive, * below are negative. * @details \b Inputs: fpgaSensorReadings * @details \b Outputs: none * @return latest arterial pressure reading *************************************************************************/ -U16 getPBAPressure( void ) +U16 getH2Pressure( void ) { - return fpgaSensorReadings.PBAPressure; + return fpgaSensorReadings.h2Pressure; } /*********************************************************************//** * @brief - * The getPBATemperature function gets the latest arterial pressure + * The getH2Temperature function gets the latest arterial pressure * sensor temperature reading. * @details \b Inputs: fpgaSensorReadings * @details \b Outputs: none * @return latest arterial pressure sensor temperature reading *************************************************************************/ -S16 getPBATemperature( void ) +S16 getH2Temperature( void ) { - return fpgaSensorReadings.PBATemperature; + return fpgaSensorReadings.h2Temperature; } /*********************************************************************//** * @brief - * The getPBAReadCounter function gets the latest arterial + * The getH2ReadCounter function gets the latest arterial * pressure sensor read counter. * @details \b Inputs: fpgaSensorReadings * @details \b Outputs: none * @return latest arterial pressure sensor read counter *************************************************************************/ -U08 getPBAReadCounter( void ) +U08 getH2ReadCounter( void ) { - return fpgaSensorReadings.PBAReadCount; + return fpgaSensorReadings.h2ReadCount; } /*********************************************************************//** * @brief - * The getPBAErrorCounter function gets the latest arterial + * The getH2ErrorCounter function gets the latest arterial * pressure sensor error counter. * @details \b Inputs: fpgaSensorReadings * @details \b Outputs: none * @return latest arterial pressure sensor error counter *************************************************************************/ -U08 getPBAErrorCounter( void ) +U08 getH2ErrorCounter( void ) { - return fpgaSensorReadings.PBAErrorCount; + return fpgaSensorReadings.h2ErrorCount; } /*********************************************************************//** * @brief - * The getPBOPressure function gets the latest venous pressure reading. + * The getH14Pressure function gets the latest venous pressure reading. * The high 2 bits are status bits: 00=ok, 01=cmd mode, 10=stale data, 11=diag * The low 14 bits are data. Zero is at 1638. Values above are positive, * below are negative. * @details \b Inputs: fpgaSensorReadings * @details \b Outputs: none * @return latest venous pressure reading *************************************************************************/ -U16 getPBOPressure( void ) +U16 getH14Pressure( void ) { - return fpgaSensorReadings.PBoPressure; + return fpgaSensorReadings.h14Pressure; } /*********************************************************************//** * @brief - * The getPBOTemperature function gets the latest venous pressure + * The getH14Temperature function gets the latest venous pressure * sensor temperature reading. * @details \b Inputs: fpgaSensorReadings * @details \b Outputs: none * @return latest venous pressure sensor temperature reading *************************************************************************/ -S16 getPBOTemperature( void ) +S16 getH14Temperature( void ) { - return fpgaSensorReadings.PBoTemperature; + return fpgaSensorReadings.h14Temperature; } /*********************************************************************//** * @brief - * The getPBOReadCounter function gets the latest venous pressure + * The getH14ReadCounter function gets the latest venous pressure * sensor read counter. * @details \b Inputs: fpgaSensorReadings * @details \b Outputs: none * @return latest venous pressure sensor read counter *************************************************************************/ -U08 getPBOReadCounter( void ) +U08 getH14ReadCounter( void ) { - return fpgaSensorReadings.PBoReadCount; + return fpgaSensorReadings.h14ReadCount; } /*********************************************************************//** * @brief - * The getPBOErrorCounter function gets the latest venous pressure + * The getH14ErrorCounter function gets the latest venous pressure * sensor error counter. * @details \b Inputs: fpgaSensorReadings * @details \b Outputs: none * @return latest venous pressure sensor error counter *************************************************************************/ -U08 getPBOErrorCounter( void ) +U08 getH14ErrorCounter( void ) { - return fpgaSensorReadings.PBoErrorCount; + return fpgaSensorReadings.h14ErrorCount; } /*********************************************************************//** @@ -684,47 +684,47 @@ void getFPGAAirTrapLevels( BOOL *airAtLower, BOOL *airAtUpper ) { U16 fpgaGPIO = fpgaSensorReadings.GPIOReg; - U16 lower = fpgaGPIO & FPGA_AIRTRAP_LEVEL_LOW_MASK; - U16 upper = fpgaGPIO & FPGA_AIRTRAP_LEVEL_HIGH_MASK; + U16 lower = fpgaGPIO & FPGA_AIRTRAP_LEVEL_LOW_H17_MASK; + U16 upper = fpgaGPIO & FPGA_AIRTRAP_LEVEL_HIGH_H16_MASK; *airAtLower = ( 0 == lower ? FALSE : TRUE ); *airAtUpper = ( 0 == upper ? FALSE : TRUE ); } /*********************************************************************//** * @brief - * The setFPGAValvesControlMode function sets the valves control mode. - * @note VBTControl register bit 0 will drive state of VBT valve (0=closed, 1=open). + * The setH13ValveState function sets the command position for H13 valve. + * @note VBTControl register bit 0 will drive state of H13 valve (0=closed, 1=open). * @details \b Inputs: fpgaActuatorSetPoints * @details \b Outputs: fpgaActuatorSetPoints - * @param bits : The bits to enable the PID controller of a valve + * @param state : The valve state to command H13 valve to * @return none *************************************************************************/ -void setVBTValveState( OPN_CLS_STATE_T state ) +void setH13ValveState( OPN_CLS_STATE_T state ) { if ( STATE_OPEN == state ) { - fpgaActuatorSetPoints.VBTControl |= FPGA_VBT_OPEN_BIT_MASK; + fpgaActuatorSetPoints.h13Control |= FPGA_H13_OPEN_BIT_MASK; } else { - fpgaActuatorSetPoints.VBTControl &= ~((U08)FPGA_VBT_OPEN_BIT_MASK); + fpgaActuatorSetPoints.h13Control &= ~((U08)FPGA_H13_OPEN_BIT_MASK); } } /*********************************************************************//** * @brief - * The ADVBubbleDetected function determines whether ADV bubble detector + * The H18BubbleDetected function determines whether H18 bubble detector * sensor is currently detecting a bubble. * @details \b Inputs: fpgaSensorReadings * @details \b Outputs: none - * @return TRUE if latest ADV reading shows bubble detected, FALSE if not + * @return TRUE if latest H18 reading shows bubble detected, FALSE if not *************************************************************************/ -BOOL ADVBubbleDetected( void ) +BOOL H18BubbleDetected( void ) { U16 noBubbleDetected = 0; - noBubbleDetected = fpgaSensorReadings.GPIOReg & FPGA_ADV_BUBBLE_STATUS_MASK; + noBubbleDetected = fpgaSensorReadings.GPIOReg & FPGA_H18_BUBBLE_STATUS_MASK; return ( 0 == noBubbleDetected ? TRUE : FALSE ); } @@ -757,7 +757,7 @@ /*********************************************************************//** * @brief - * The setVBVControl function sets the control bits for the venous pinch valve. + * The setH19Control function sets the control bits for the venous pinch valve. * Microstep setting: bits 0..2: * 0=full step (100% torque) * 1=1/2 step (100% torque) @@ -783,82 +783,82 @@ * @param controlBits The control bits to apply to the venous pinch valve. * @return none *************************************************************************/ -void setVBVControl( U08 controlBits ) +void setH19Control( U08 controlBits ) { - fpgaActuatorSetPoints.VBVControl = controlBits; + fpgaActuatorSetPoints.H19Control = controlBits; } /*********************************************************************//** * @brief - * The getVBVControl function gets the current control bits for the VBV. + * The getH19Control function gets the current control bits for the H19 valve. * @details \b Inputs: fpgaActuatorSetPoints * @details \b Outputs: none - * @return fpgaActuatorSetPoints.VBVControl + * @return fpgaActuatorSetPoints.H19Control *************************************************************************/ -U08 getVBVControl( void ) +U08 getH19Control( void ) { - return fpgaActuatorSetPoints.VBVControl; + return fpgaActuatorSetPoints.H19Control; } /*********************************************************************//** * @brief - * The setVBVPosition function sets the travel from current position for the - * VBV in counts (or microcounts if microstepping is set in control register). + * The setH19Position function sets the travel from current position for the + * H19 valve in counts (or microcounts if microstepping is set in control register). * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints - * @param setPoint The target encoder position of the VBV in counts + * @param setPoint The target encoder position of the H19 valve in counts * @return none *************************************************************************/ -void setVBVPosition( U16 setPoint ) +void setH19Position( U16 setPoint ) { - fpgaActuatorSetPoints.VBVPosition = setPoint; + fpgaActuatorSetPoints.H19Position = setPoint; } /*********************************************************************//** * @brief - * The getVBVEncoderPosition function reads the current encoder position of the - * VBV in counts. + * The getH19EncoderPosition function reads the current encoder position of the + * H19 valve in counts. * @note There are 1024 encoder counts per revolution. The encoder position * register provides the number of steps traveled since last command given. * @details \b Inputs: fpgaSensorReadings * @details \b Outputs: none - * @return The current encoder position of VBV + * @return The current encoder position of H19 valve *************************************************************************/ -S16 getVBVEncoderPosition( void ) +S16 getH19EncoderPosition( void ) { - return fpgaSensorReadings.VBVEncPosition; + return fpgaSensorReadings.H19EncPosition; } /*********************************************************************//** * @brief - * The getVBVCmdPosition function returns the current amount of travel + * The getH19CmdPosition function returns the current amount of travel * from the pre-command position in steps (or microsteps if microstepping is - * set in control register) for VBV. + * set in control register) for H19 valve. * @note There are 200 steps per revolution * @details \b Inputs: fpgaSensorReadings * @details \b Outputs: none - * @return The commanded encoder position of VBV + * @return The commanded encoder position of H19 valve *************************************************************************/ -S16 getVBVCmdPosition( void ) +S16 getH19CmdPosition( void ) { - return fpgaSensorReadings.VBVCmdPosition; + return fpgaSensorReadings.H19CmdPosition; } /*********************************************************************//** * @brief - * The getVBVStatus function reads the status of the venous pinch valve. + * The getH19Status function reads the status of the venous pinch valve. * @details \b Inputs: fpgaSensorReadings * @details \b Outputs: none * @return Latest status of the venous pinch valve *************************************************************************/ -U16 getVBVStatus( void ) +U16 getH19Status( void ) { - return fpgaSensorReadings.VBVStatus; + return fpgaSensorReadings.H19Status; } /*********************************************************************//** * @brief - * The setVBAControl function sets the control bits for the arterial pinch valve. + * The setH1Control function sets the control bits for the arterial pinch valve. * Microstep setting: bits 0..2: * 0=full step (100% torque) * 1=1/2 step (100% torque) @@ -884,76 +884,76 @@ * @param controlBits The control bits to apply to the arterial pinch valve. * @return none *************************************************************************/ -void setVBAControl( U08 controlBits ) +void setH1Control( U08 controlBits ) { - fpgaActuatorSetPoints.VBAControl = controlBits; + fpgaActuatorSetPoints.H1Control = controlBits; } /*********************************************************************//** * @brief - * The getVBAControl function gets the current control bits for the VBA. + * The getH1Control function gets the current control bits for the H1 valve. * @details \b Inputs: fpgaActuatorSetPoints * @details \b Outputs: none - * @return fpgaActuatorSetPoints.VBAControl + * @return fpgaActuatorSetPoints.H1Control *************************************************************************/ -U08 getVBAControl( void ) +U08 getH1Control( void ) { - return fpgaActuatorSetPoints.VBAControl; + return fpgaActuatorSetPoints.H1Control; } /*********************************************************************//** * @brief - * The setVBAPosition function sets the travel from current position for the - * VBA in counts (or microcounts if microstepping is set in control register). + * The setH1Position function sets the travel from current position for the + * H1 valve in counts (or microcounts if microstepping is set in control register). * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints - * @param setPoint The target encoder position of the VBA in counts + * @param setPoint The target encoder position of the H1 valve in counts * @return none *************************************************************************/ -void setVBAPosition( U16 setPoint ) +void setH1Position( U16 setPoint ) { - fpgaActuatorSetPoints.VBAPosition = setPoint; + fpgaActuatorSetPoints.H1Position = setPoint; } /*********************************************************************//** * @brief - * The getVBAEncoderPosition function reads the current encoder position of the - * VBA in counts. + * The getH1EncoderPosition function reads the current encoder position of the + * H1 valve in counts. * @note There are 1024 encoder counts per revolution * @details \b Inputs: fpgaSensorReadings * @details \b Outputs: none - * @return The latest encoder position of VBA + * @return The latest encoder position of H1 valve *************************************************************************/ -S16 getVBAEncoderPosition( void ) +S16 getH1EncoderPosition( void ) { - return fpgaSensorReadings.VBAEncPosition; + return fpgaSensorReadings.H1EncPosition; } /*********************************************************************//** * @brief - * The getVBACmdPosition function returns returns the current amount of travel + * The getH1CmdPosition function returns returns the current amount of travel * from the pre-command position in steps (or microsteps if microstepping is - * set in control register) for VBA. + * set in control register) for H1 valve. * @note There are 200 steps per revolution * @details \b Inputs: fpgaSensorReadings * @details \b Outputs: none - * @return The commanded encoder position of VBA + * @return The commanded encoder position of H1 valve *************************************************************************/ -S16 getVBACmdPosition( void ) +S16 getH1CmdPosition( void ) { - return fpgaSensorReadings.VBACmdPosition; + return fpgaSensorReadings.H1CmdPosition; } /*********************************************************************//** * @brief - * The getVBAStatus function reads the status of the arterial pinch valve. + * The getH1Status function reads the status of the arterial pinch valve. * @details \b Inputs: fpgaSensorReadings * @details \b Outputs: none * @return Latest status of the arterial pinch valve *************************************************************************/ -U16 getVBAStatus( void ) +U16 getH1Status( void ) { - return fpgaSensorReadings.VBAStatus; + return fpgaSensorReadings.H1Status; } /*********************************************************************//** @@ -996,7 +996,7 @@ *************************************************************************/ U32 getFPGAPBAADCTemperature( void ) { - return fpgaSensorReadings.PBATemperature; + return fpgaSensorReadings.h2Temperature; } /*********************************************************************//** Index: firmware/App/Services/FpgaTD.h =================================================================== diff -u -r56100135135bb715d316b5fd002a4a4951b9334a -rf3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa --- firmware/App/Services/FpgaTD.h (.../FpgaTD.h) (revision 56100135135bb715d316b5fd002a4a4951b9334a) +++ firmware/App/Services/FpgaTD.h (.../FpgaTD.h) (revision f3a26c402a2ec88f5ee7dbb8eb7127ab5b4692aa) @@ -54,49 +54,49 @@ void setAlarmAudioState( U32 state, U32 volumeLevel, U32 volumeDivider ); -void setBPEnabled( BOOL enable ); -void setBPDirection( MOTOR_DIR_T dir ); -void homeBP( void ); -void resetBPHomeRequest( void ); -void setBPSetSpeed( U16 rpm ); -U16 getBPPeriod( void ); +void setH4Enabled( BOOL enable ); +void setH4Direction( MOTOR_DIR_T dir ); +void homeH4( void ); +void resetH4HomeRequest( void ); +void setH4SetSpeed( U16 rpm ); +U16 getH4Period( void ); U16 getBloodPumpHallSensorCount( void ); U08 getBloodPumpHallSensorStatus( void ); -U16 getPBAPressure( void ); -S16 getPBATemperature( void ); -U08 getPBAReadCounter( void ); -U08 getPBAErrorCounter( void ); +U16 getH2Pressure( void ); +S16 getH2Temperature( void ); +U08 getH2ReadCounter( void ); +U08 getH2ErrorCounter( void ); -U16 getPBOPressure( void ); -S16 getPBOTemperature( void ); -U08 getPBOReadCounter( void ); -U08 getPBOErrorCounter( void ); +U16 getH14Pressure( void ); +S16 getH14Temperature( void ); +U08 getH14ReadCounter( void ); +U08 getH14ErrorCounter( void ); F32 getFPGABackupAlarmAudioCurrent( void ); void getFPGAAirTrapLevels( BOOL *airAtLower, BOOL *airAtUpper ); -BOOL ADVBubbleDetected( void ); +BOOL H18BubbleDetected( void ); void setFPGAVenousBubbleSelfTest( void ); void clearFPGAVenousBubbleSelfTest( void ); -void setVBTValveState( OPN_CLS_STATE_T state ); +void setH13ValveState( OPN_CLS_STATE_T state ); -void setVBVControl( U08 controlBits ); -U08 getVBVControl( void ); -void setVBVPosition( U16 setPoint ); -S16 getVBVEncoderPosition( void ); -S16 getVBVCmdPosition( void ); -U16 getVBVStatus( void ); +void setH19Control( U08 controlBits ); +U08 getH19Control( void ); +void setH19Position( U16 setPoint ); +S16 getH19EncoderPosition( void ); +S16 getH19CmdPosition( void ); +U16 getH19Status( void ); -void setVBAControl( U08 controlBits ); -U08 getVBAControl( void ); -void setVBAPosition( U16 setPoint ); -S16 getVBAEncoderPosition( void ); -S16 getVBACmdPosition( void ); -U16 getVBAStatus( void ); +void setH1Control( U08 controlBits ); +U08 getH1Control( void ); +void setH1Position( U16 setPoint ); +S16 getH1EncoderPosition( void ); +S16 getH1CmdPosition( void ); +U16 getH1Status( void ); U16 getFPGABoardTemperature( void ); U32 getFPGAPBAADCTemperature( void );