Index: firmware/App/Services/FpgaTD.h =================================================================== diff -u -r1920626b448b9ee88ae9fcfb5461067fc92da648 -r7f22307635cf6c73dca1a2cc86c5f57ae62dde4d --- firmware/App/Services/FpgaTD.h (.../FpgaTD.h) (revision 1920626b448b9ee88ae9fcfb5461067fc92da648) +++ firmware/App/Services/FpgaTD.h (.../FpgaTD.h) (revision 7f22307635cf6c73dca1a2cc86c5f57ae62dde4d) @@ -52,21 +52,6 @@ #define SYRINGE_PUMP_CONTROL_FORWARD_DIR 0x00 ///< Syringe pump control register bit mask for forward direction. #define SYRINGE_PUMP_CONTROL_32TH_STEP 0x03 ///< Syringe pump control register bits for 1/32 micro-stepping mode. -// Bit definitions for NIBP control register -#define FPGA_NIBP_CMD_MASK 0x0F ///< Bit mask for NIBP command bits [3:0]. -#define FPGA_NIBP_CMD_RDY 0x10 ///< NIBP command ready pulse bit. -#define FPGA_NIBP_PUMP_ON 0x20 ///< NIBP pump manual control enable bit. -#define FPGA_NIBP_CTRL_VALVE_CLOSE 0x40 ///< NIBP control valve close bit. -#define FPGA_NIBP_DUMP_VALVE_CLOSE 0x80 ///< NIBP dump valve close bit. - -// Bit definitions for NIBP response register -#define FPGA_NIBP_RESP_VALID 0x01 ///< Indicates valid NIBP response available. -#define FPGA_NIBP_MEASURING 0x02 ///< Indicates NIBP measurement in progress. -#define FPGA_NIBP_RESP_CODE_MASK 0x3C ///< Bit mask for NIBP response code bits [5:2]. -#define FPGA_NIBP_RESP_CODE_SHIFT 2 ///< Shift for NIBP response code bits. -#define FPGA_NIBP_MODULE_ERROR 0x40 ///< Indicates NIBP module command processing error. -#define FPGA_NIBP_MODULE_BUSY 0x80 ///< Indicates NIBP module busy processing command. - /// Baro sensor manufacturing coefficients typedef struct { @@ -83,17 +68,17 @@ /// FPGA NIBP command definitions typedef enum { - FPGA_NIBP_CMD_IDLE = 0x00, ///< No command. - FPGA_NIBP_CMD_GET_MODULE_DATA = 0x01, ///< Get NIBP module information. - FPGA_NIBP_CMD_SET_INITIAL_INFLATE = 0x02, ///< Set initial cuff inflate pressure. - FPGA_NIBP_CMD_START_BP = 0x03, ///< Start adult BP measurement. - FPGA_NIBP_CMD_START_PEDS_BP = 0x04, ///< Start pediatric BP measurement. - FPGA_NIBP_CMD_ABORT_BP = 0x05, ///< Abort active BP measurement. - FPGA_NIBP_CMD_GET_CUFF_PRESSURE = 0x06, ///< Read cuff pressure. - FPGA_NIBP_CMD_GET_BP_DATA = 0x07, ///< Read BP measurement data. - FPGA_NIBP_CMD_SET_SLEEP_MODE = 0x08, ///< Set NIBP module sleep mode. - FPGA_NIBP_CMD_CONTROL_PNEUMATICS = 0x09, ///< Control pneumatic outputs. - FPGA_NIBP_CMD_RESET = 0x0A ///< Reset NIBP module. + FPGA_NIBP_CMD_IDLE = 0x00, ///< No command. + FPGA_NIBP_CMD_GET_MODULE_DATA = 0x01, ///< Get NIBP module data. + FPGA_NIBP_CMD_SET_INITIAL_INFLATE = 0x02, ///< Set initial inflate pressure. + FPGA_NIBP_CMD_START_BP = 0x03, ///< Start adult BP measurement. + FPGA_NIBP_CMD_START_PEDS_BP = 0x04, ///< Start pediatric BP measurement. + FPGA_NIBP_CMD_ABORT_BP = 0x05, ///< Abort BP measurement. + FPGA_NIBP_CMD_GET_CUFF_PRESSURE = 0x06, ///< Get cuff pressure. + FPGA_NIBP_CMD_GET_BP_DATA = 0x07, ///< Get BP data. + FPGA_NIBP_CMD_SET_SLEEP_MODE = 0x08, ///< Set sleep mode. + FPGA_NIBP_CMD_CONTROL_PNEUMATICS = 0x09, ///< Control pneumatics. + FPGA_NIBP_CMD_RESET = 0x0A ///< Reset NIBP module. } FPGA_NIBP_CMD_T; // ********** public function prototypes ********** @@ -179,28 +164,19 @@ U16 getFPGAInletFan1TogglePeriod( void ); BOOL getH9FrontDoorClosedStatus( void ); -U32 getFPGAEjectorRetractOpticalSensor( void ); -U32 getFPGAEjectorEngageOpticalSensor( void ); +U32 getFPGAEjectorRetractOpticalSensor( void ); +U32 getFPGAEjectorEngageOpticalSensor( void ); void setNIBPCommand( FPGA_NIBP_CMD_T command ); void setNIBPInflatePressure( U16 pressure ); -U08 getNIBPControl( void ); -void setNIBPControl( U08 control ); - -FPGA_NIBP_CMD_T getNIBPLastCommand( void ); - -BOOL isNIBPCommandReady( void ); -BOOL isNIBPResponseValid( void ); -BOOL isNIBPMeasuring( void ); -BOOL isNIBPModuleError( void ); -BOOL isNIBPModuleBusy( void ); - -U08 getNIBPResponseCode( void ); +U08 getNIBPControlStatus( void ); +U08 getNIBPStatusResponse( void ); S16 getNIBPCuffPressure( void ); U16 getNIBPSystolicPressure( void ); U16 getNIBPDiastolicPressure( void ); U16 getNIBPHeartRate( void ); + /**@}*/ #endif