/************************************************************************** * * 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 DDCommon.h * * @author (last) Vinayakam Mani * @date (last) 06-Aug-2024 * * @author (original) Vinayakam Mani * @date (original) 06-Aug-2024 * ***************************************************************************/ #ifndef __DD_COMMON_H__ #define __DD_COMMON_H__ #include "hal_stdtypes.h" // ********** version ********** #define DD_VERSION_MAJOR 0 #define DD_VERSION_MINOR 0 #define DD_VERSION_MICRO 0 #define DD_VERSION_BUILD 7 // ********** development build switches ********** #ifndef _RELEASE_ #ifndef _VECTORCAST_ // #define TASK_TIMING_OUTPUT_ENABLED 1 // Re-purposes alarm lamp pins for task timing //Uncomment the below line for new dosing pump testing //#define __PUMPTEST__ 1 //Uncomment below line for future hardware version //#define __ALPHA_AO_VER__ 1 //Uncomment below for dialysate pump PI testing //#define __PITEST__ 1 //Uncomment below if diener concentrate pump used //#define __DIENER_CONC_PUMP__ 1 //Uncomment below if beta hardware is used //#define __BETA_HW_VER__ 1 //Uncomment below if barometric pressure sensor reading available //#define __BARO_PRES_SENSOR__ 1 //Uncomment below if required hardware available ( baro and cond sensor) for testing //#define ENABLE_ALARM_1 //Uncomment below once characterization/study completed //#define ENABLE_ALARM_2 //Uncomment below to disable heaters debug message #define __HEATERS_DEBUG__ 1 #include #include #endif #endif #include "Common.h" /** * @addtogroup Main * @{ */ // **** Common Definitions **** #pragma pack(push,1) /// Payload record structure for an TD versions message. typedef struct { U08 major; ///< TD version major revision. U08 minor; ///< TD version minor revision. U08 micro; ///< TD version micro revision. U16 build; ///< TD build version. U08 fpgaId; ///< TD FPGA ID. U08 fpgaMajor; ///< TD FPGA major revision. U08 fpgaMinor; ///< TD FPGA minor revision. U08 fpgaLab; ///< TD FPGA lab revision. U32 compatibilityRev; ///< TD compatibility revision. } TD_VERSIONS_T; /// DD version struct. typedef struct { U08 major; ///< DD version major revision. U08 minor; ///< DD version major revision. U08 micro; ///< DD version micro revision. U16 build; ///< DD build version. U08 fpgaId; ///< DD FPGA ID. U08 fpgaMajor; ///< DD FPGA major revision. U08 fpgaMinor; ///< DD FPGA minor revision. U08 fpgaLab; ///< DD FPGA lab revision. U32 compatibilityRev; ///< DD compatibility revision. } DD_VERSIONS_T; /// Record defining the fields in a UI version request message. typedef struct { U08 major; ///< Major version for UI software. U08 minor; ///< Minor version for UI software. U08 micro; ///< Micro version for UI software. U16 build; ///< Build number for UI software. U32 compatibility; ///< Compatibility revision. } UI_VERSIONS_T; /// Payload record structure for a peristaltic pump data message. typedef struct { U32 setPoint; ///< Set point. F32 measFlow; ///< Measured flow in mL/min. F32 measRotorSpd; ///< Measured rotor speed in RPM. F32 measPumpSpd; ///< Measured pump speed in RPM. F32 measMCSpd; ///< Measured motor speed in RPM. F32 measMCCurr; ///< Measured motor current in Amps. F32 pwmDC; ///< Duty cycle. } PERISTALTIC_PUMP_STATUS_PAYLOAD_T; /// Payload record structure for a pump set point override message. typedef struct { BOOL reset; ///< Reset. S32 setPt; ///< Set point. U32 ctrlMode; ///< Control mode. } OVERRIDE_PUMP_SET_PT_PAYLOAD_T; #pragma pack(pop) // **** Common Macros **** /**@}*/ // **** VectorCAST Definitions **** #ifdef _VECTORCAST_ #endif #endif