Index: firmware/App/Controllers/DGInterface.h =================================================================== diff -u -r7c8ec681f8c5dc44674893b5c3924a6203f2c8d0 -r8e7158d8231435496fcf1d5649e51babf859ccc7 --- firmware/App/Controllers/DGInterface.h (.../DGInterface.h) (revision 7c8ec681f8c5dc44674893b5c3924a6203f2c8d0) +++ firmware/App/Controllers/DGInterface.h (.../DGInterface.h) (revision 8e7158d8231435496fcf1d5649e51babf859ccc7) @@ -1,18 +1,19 @@ -/**********************************************************************//** - * - * Copyright (c) 2019-2020 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 DGInterface.h - * - * @date 08-Apr-2020 - * @author S. Nash - * - * @brief DGInterface (dialysate generator) header file. - * - **************************************************************************/ +/************************************************************************** +* +* Copyright (c) 2019-2021 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 DGInterface.h +* +* @author (last) Sean Nash +* @date (last) 01-Dec-2020 +* +* @author (original) Sean +* @date (original) 08-Apr-2020 +* +***************************************************************************/ #ifndef __DG_H__ #define __DG_H__ @@ -31,8 +32,12 @@ // ********** public definitions ********** -#define DRAIN_RESERVOIR_TO_VOLUME_ML 200 ///< Drain reservoir to this volume (in mL) during treatment. -#define FILL_RESERVOIR_TO_VOLUME_ML 1700 ///< Fill reservoir to this volume (in mL) during treatment. +#define DRAIN_RESERVOIR_TO_VOLUME_ML 200 ///< Drain reservoir to this volume (in mL) during treatment. +#ifndef V1_5_SYSTEM +#define FILL_RESERVOIR_TO_VOLUME_ML 1700 ///< Fill reservoir to this volume (in mL) during treatment. +#else +#define FILL_RESERVOIR_TO_VOLUME_ML 1300 ///< Fill reservoir to this volume (in mL) during treatment. +#endif /// Enumeration of DG reservoirs. typedef enum DG_Reservoirs @@ -52,6 +57,55 @@ NUM_OF_DG_PRESSURE_SENSORS ///< Number of pressure sensors. } DG_PRESSURE_SENSORS_T; +/// Payload record structure for an RO pump data message. +typedef struct +{ + U32 setPtPSI; + F32 measFlowRateMlMin; + F32 setPWMDutyCyclePct; +} DG_RO_PUMP_DATA_PAYLOAD_T; + +/// Payload record structure for a drain pump data message. +typedef struct +{ + U32 setPtRPM; + F32 setDAC; +} DG_DRAIN_PUMP_DATA_PAYLOAD_T; + +/// Payload record structure for a DG pressures data message. +typedef struct +{ + F32 roInPSI; + F32 roOutPSI; + F32 drainInPSI; + F32 drainOutPSI; +} DG_PRESSURES_DATA_PAYLOAD_T; + +/// Payload record structure for a reservoirs data message. +typedef struct +{ + U32 resID; + U32 setFillToVolumeMl; + U32 setDrainToVolumeMl; +} DG_RESERVOIRS_DATA_PAYLOAD_T; + +/// Payload record structure for DG temperature sensors data message. +typedef struct +{ + F32 TPi; + F32 TPo; + F32 TD1; + F32 TD2; + F32 TRo; + F32 TDi; + F32 HtrPrimThermo; + F32 HtrTrimThermo; + F32 HtrPrimColdJunc; + F32 HtrTrimColdJunc; + F32 HtrPrimInternal; + F32 HtrTrimInternal; +} DG_TEMPERATURES_T; + // ********** public function prototypes ********** void initDGInterface( void );