#ifndef __BLOODLEAKDRIVER_H__ #define __BLOODLEAKDRIVER_H__ #include "DDCommon.h" /** * @defgroup BloodLeakDriver BloodLeakDriver * @brief Blood Leak detector driver module. Drives the * blood leak detector. * * INTROTEK - Blood Component Detector Part No. 105-0002 * * @addtogroup BloodLeakDriver * @{ */ // ********** public definitions ********** /// Blood leak detector data publish typedef struct { U32 bloodLeakStatus; ///< Blood leak detector status. U32 bloodLeakState; ///< Blood leak detector state. U32 bloodLeakPersistentCounter; ///< Blood leak detector persistent counter. U32 bloodLeakSerialCommState; ///< Blood leak detector serial communication state. U32 bloodLeakIntensity; ///< Blood leak detector intensity. U32 bloodLeakDetect; ///< Blood leak detector detect. F32 bloodLeakIntensityMovingAvg; ///< Blood leak detector intensity moving average. U32 bloodLeakTimeSinceZeroMS; ///< Blood leak detector time since last zero in milliseconds. U32 driftInRangeStatus; ///< Blood leak detector drift in range status. U32 driftUpperRangeStatus; ///< Blood leak detector drift upper range status. } BLOOD_LEAK_DATA_T; // ********** public function prototypes ********** void initBloodLeak( void ); void execBloodLeakEmbModeCommand( void ); // Embedded mode command queue void enqueueEmbModeCmd( U08 cmd ); U08 dequeueEmbModeCmd( void ); U32 getAvailableEmbModeQueueCount( void ); BOOL isEmbModeCmdQueueEmpty( void ); void enqueueInfoEmbModeCmds( void ); // Embedded mode info/response void resetEmbModeCmdRqstCount( U08 cmd ); void resetEmbModeCmdRespConsumedFlag( U08 cmd ); U32 getEmbModeInfoValue( U08 cmd ); void processReceivedEmbModeChar( U08 data ); BOOL testSetBloodLeak2EmbeddedMode( MESSAGE_T *message ); BOOL testSetBloodLeakEmbeddedModeCommand( MESSAGE_T *message ); BOOL testBloodLeakEmbeddedModeInfoOverride( MESSAGE_T *message ); /**@}*/ #endif