/************************************************************************** * * Copyright (c) 2024-2024 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 PressureSensor.h * * @author (last) Vinayakam Mani * @date (last) 04-Sep-2024 * * @author (original) Vinayakam Mani * @date (original) 04-Sep-2024 * ***************************************************************************/ #ifndef __PRESSURE_SENSOR_H__ #define __PRESSURE_SENSOR_H__ #include "DDCommon.h" #include "PressureCommon.h" /** * @defgroup PressureSensor PressureSensor * @brief Pressure sensors driver module. Reads the various DD pressure * sensors raw pressure and temperature value. * * @addtogroup PressureSensor * @{ */ // ********** public definitions ********** /// Enumeration of pressure sensors monitored by this module. typedef enum PressureSensors { M1_PRES = 0, ///< Water Inlet pressure before regulator (PRi) PRESSURE_SENSOR_FIRST = M1_PRES, ///< First pressure to scan M3_PRES, ///< Water Inlet pressure after regulator (PRo) D9_PRES, ///< Hydraulics outlet pressure (PHo/Pn) D66_PRES, ///< Dry Bicarb pressure (PDB/PCb) D51_PRES, ///< Spent Dialysate pressure (PDs) D18_PRES, ///< Fresh Dialysate pressure (PDf) D41_PRES, ///< Transmembrane pressure (Ptm) BARO_PRES, ///< barometric pressure sensor NUM_OF_PRESSURE_SENSORS ///< Number of pressure sensors } PRESSURE_SENSORS_T; // ********** 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 testPressureSensorReadingsOverride( MESSAGE_T *message ); BOOL testPressureSensorTemperatureReadingsOverride( MESSAGE_T *message ); BOOL testPressureSensorReadCounterOverride( MESSAGE_T *message ); BOOL testPressureSensorErrorCounterOverride( MESSAGE_T *message ); /**@}*/ #endif