/************************************************************************** * * 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 TDCommon.h * * @author (last) Sean * @date (last) 31-Jul-2024 * * @author (original) Sean * @date (original) 31-Jul-2024 * ***************************************************************************/ #ifndef __TD_COMMON_H__ #define __TD_COMMON_H__ #include "hal_stdtypes.h" // ********** version ********** #define TD_VERSION_MAJOR 0 #define TD_VERSION_MINOR 0 #define TD_VERSION_MICRO 0 #define TD_VERSION_BUILD 19 // ********** development build switches ********** #ifndef _RELEASE_ #ifndef _VECTORCAST_ // #define TASK_TIMING_OUTPUT_ENABLED 1 // Re-purposes alarm lamp pins for task timing // #define TEST_AIR_TRAP_ALPHA_TESTING 1 // Alpha unit air trap testing // #define TEST_PINCH_VALVES 1 // Alpha unit pinch valve testing // #define TEST_DEBUGGER 1 // Testing with debugger - prevents FPGA comm alarms caused by breakpoints // #define TEST_PROCESS_TASKS_WO_UI 1 // Allow task processing even when UI not connected // #define TEST_UI_ONLY 1 // Alpha test with TD and UI only - no DD // #define TEST_USE_OFF_AS_STOP_BUTTON 1 // Alpha test re-purposing off button as a stop button #define TEST_NO_PRESSURE_CHECKS 1 // Alpha test with no pressure sensor checks // #define TEST_NO_STOP_CONSUME_CHECK 1 // Alpha test with no check for stop button timeout // #define ASN_DEMO 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; ///< HD version major revision. U08 minor; ///< HD version minor revision. U08 micro; ///< HD version micro revision. U16 build; ///< HD build version. U08 fpgaId; ///< HD FPGA ID. U08 fpgaMajor; ///< HD FPGA major revision. U08 fpgaMinor; ///< HD FPGA minor revision. U08 fpgaLab; ///< HD FPGA lab revision. U32 compatibilityRev; ///< HD compatibility revision. } TD_VERSIONS_T; /// DD version struct. typedef struct { U08 major; ///< DG version major revision. U08 minor; ///< DG version major revision. U08 micro; ///< DG version micro revision. U16 build; ///< DG build version. U08 fpgaId; ///< DG FPGA ID. U08 fpgaMajor; ///< DG FPGA major revision. U08 fpgaMinor; ///< DG FPGA minor revision. U08 fpgaLab; ///< DG FPGA lab revision. U32 compatibilityRev; ///< DG 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