Index: firmware/App/Services/FpgaTD.c =================================================================== diff -u -r1c21d74bc369572b0fcc5b978adc23dc9ce7c656 -r61a682bdc061446828bdc1d868791422242b0ab7 --- firmware/App/Services/FpgaTD.c (.../FpgaTD.c) (revision 1c21d74bc369572b0fcc5b978adc23dc9ce7c656) +++ firmware/App/Services/FpgaTD.c (.../FpgaTD.c) (revision 61a682bdc061446828bdc1d868791422242b0ab7) @@ -1592,8 +1592,119 @@ } /*********************************************************************//** -<<<<<<< HEAD +* @brief +* The setNIBPCommand function sets the FPGA NIBP command bits and pulses +* the command ready bit to notify the FPGA that a new NIBP command is +* available. +* @details \b Inputs: none +* @details \b Outputs: fpgaActuatorSetPoints +* @param command Blood pressure command to send to the FPGA. +* @return none +*************************************************************************/ +void setNIBPCommand( U08 command ) +{ + fpgaActuatorSetPoints.nibpCtl &= ~FPGA_NIBP_CMD_MASK; + fpgaActuatorSetPoints.nibpCtl |= ( (U16)command & FPGA_NIBP_CMD_MASK ); + if ( 0 == command ) + { + fpgaActuatorSetPoints.nibpCtl &= ~FPGA_NIBP_CMD_RDY; + } + else + { + fpgaActuatorSetPoints.nibpCtl |= FPGA_NIBP_CMD_RDY; + } +} + +/*********************************************************************//** +* @brief +* The setNIBPInflatePressure function sets the initial NIBP cuff inflate +* pressure register. +* @details \b Inputs: none +* @details \b Outputs: fpgaActuatorSetPoints.nibpInflate +* @param pressure Initial cuff inflation pressure in mmHg. +* @return none +*************************************************************************/ +void setNIBPInflatePressure( U16 pressure ) +{ + fpgaActuatorSetPoints.nibpInflate = pressure; +} + +/********************************************************************//** * @brief + * The getNIBPControlStatus function returns the FPGA NIBP control status. + * @details \b Inputs: fpgaSensorReadings + * @details \b Outputs: none + * @return FPGA NIBP control status register. + ***************************************************************************/ +U08 getNIBPControlStatus( void ) +{ + return fpgaSensorReadings.nibpCtlStatus; +} + +/*********************************************************************//** + * @brief + * The getNIBPStatusResponse function returns the FPGA NIBP response status. + * @details \b Inputs: fpgaSensorReadings + * @details \b Outputs: none + * @return FPGA NIBP response status register. + ***************************************************************************/ +U08 getNIBPStatusResponse( void ) +{ + return fpgaSensorReadings.nibpStatusResp; +} + +/*********************************************************************//** +* @brief +* The getNIBPCuffPressure function returns the FPGA NIBP cuff pressure. +* @details \b Inputs: fpgaSensorReadings +* @details \b Outputs: none +* @return NIBP cuff pressure in mmHg. +*************************************************************************/ +S16 getNIBPCuffPressure( void ) +{ + return fpgaSensorReadings.cuffPressure; +} + +/*********************************************************************//** +* @brief +* The getNIBPSystolicPressure function returns the FPGA systolic blood +* pressure measurement. +* @details \b Inputs: fpgaSensorReadings +* @details \b Outputs: none +* @return Systolic blood pressure in mmHg. +*************************************************************************/ +U16 getNIBPSystolicPressure( void ) +{ + return fpgaSensorReadings.bpSystolic; +} + +/*********************************************************************//** +* @brief +* The getNIBPDiastolicPressure function returns the FPGA diastolic blood +* pressure measurement. +* @details \b Inputs: fpgaSensorReadings +* @details \b Outputs: none +* @return Diastolic blood pressure in mmHg. +*************************************************************************/ +U16 getNIBPDiastolicPressure( void ) +{ + return fpgaSensorReadings.bpDiastolic; +} + +/*********************************************************************//** +* @brief +* The getNIBPHeartRate function returns the FPGA heart rate measurement. +* @details \b Inputs: fpgaSensorReadings +* @details \b Outputs: none +* @return Heart rate in BPM. +*************************************************************************/ +U16 getNIBPHeartRate( void ) +{ + return fpgaSensorReadings.bpHr; +} + +/*********************************************************************//** + * @brief * The setH1CmdHeader function sets the H1 Magellan command header. * @details \b Inputs: fpgaActuatorSetPoints * @details \b Outputs: none @@ -1794,60 +1905,10 @@ U16 getH1OutputWord1( void ) { return fpgaSensorReadings.h1OutputWord1; -======= -* @brief -* The setNIBPCommand function sets the FPGA NIBP command bits and pulses -* the command ready bit to notify the FPGA that a new NIBP command is -* available. -* @details \b Inputs: none -* @details \b Outputs: fpgaActuatorSetPoints -* @param command Blood pressure command to send to the FPGA. -* @return none -*************************************************************************/ -void setNIBPCommand( U08 command ) -{ - fpgaActuatorSetPoints.nibpCtl &= ~FPGA_NIBP_CMD_MASK; - fpgaActuatorSetPoints.nibpCtl |= ( (U16)command & FPGA_NIBP_CMD_MASK ); - if ( 0 == command ) - { - fpgaActuatorSetPoints.nibpCtl &= ~FPGA_NIBP_CMD_RDY; - } - else - { - fpgaActuatorSetPoints.nibpCtl |= FPGA_NIBP_CMD_RDY; - } } /*********************************************************************//** -* @brief -* The setNIBPInflatePressure function sets the initial NIBP cuff inflate -* pressure register. -* @details \b Inputs: none -* @details \b Outputs: fpgaActuatorSetPoints.nibpInflate -* @param pressure Initial cuff inflation pressure in mmHg. -* @return none -*************************************************************************/ -void setNIBPInflatePressure( U16 pressure ) -{ - fpgaActuatorSetPoints.nibpInflate = pressure; -} - -/********************************************************************//** * @brief - * The getNIBPControlStatus function returns the FPGA NIBP control status. - * @details \b Inputs: fpgaSensorReadings - * @details \b Outputs: none - * @return FPGA NIBP control status register. - ***************************************************************************/ -U08 getNIBPControlStatus( void ) -{ - return fpgaSensorReadings.nibpCtlStatus; ->>>>>>> b176b1560b9f9f4ea685c8d2bda70c3cd5ef6421 -} - -/*********************************************************************//** - * @brief -<<<<<<< HEAD * The getH1OutputWord2 function reads H1 output word 2. * @details \b Inputs: fpgaSensorReadings * @details \b Outputs: none @@ -1966,67 +2027,4 @@ return fpgaActuatorSetPoints.h19EnableReset; } - -======= - * The getNIBPStatusResponse function returns the FPGA NIBP response status. - * @details \b Inputs: fpgaSensorReadings - * @details \b Outputs: none - * @return FPGA NIBP response status register. - ***************************************************************************/ -U08 getNIBPStatusResponse( void ) -{ - return fpgaSensorReadings.nibpStatusResp; -} - -/*********************************************************************//** -* @brief -* The getNIBPCuffPressure function returns the FPGA NIBP cuff pressure. -* @details \b Inputs: fpgaSensorReadings -* @details \b Outputs: none -* @return NIBP cuff pressure in mmHg. -*************************************************************************/ -S16 getNIBPCuffPressure( void ) -{ - return fpgaSensorReadings.cuffPressure; -} - -/*********************************************************************//** -* @brief -* The getNIBPSystolicPressure function returns the FPGA systolic blood -* pressure measurement. -* @details \b Inputs: fpgaSensorReadings -* @details \b Outputs: none -* @return Systolic blood pressure in mmHg. -*************************************************************************/ -U16 getNIBPSystolicPressure( void ) -{ - return fpgaSensorReadings.bpSystolic; -} - -/*********************************************************************//** -* @brief -* The getNIBPDiastolicPressure function returns the FPGA diastolic blood -* pressure measurement. -* @details \b Inputs: fpgaSensorReadings -* @details \b Outputs: none -* @return Diastolic blood pressure in mmHg. -*************************************************************************/ -U16 getNIBPDiastolicPressure( void ) -{ - return fpgaSensorReadings.bpDiastolic; -} - -/*********************************************************************//** -* @brief -* The getNIBPHeartRate function returns the FPGA heart rate measurement. -* @details \b Inputs: fpgaSensorReadings -* @details \b Outputs: none -* @return Heart rate in BPM. -*************************************************************************/ -U16 getNIBPHeartRate( void ) -{ - return fpgaSensorReadings.bpHr; -} - ->>>>>>> b176b1560b9f9f4ea685c8d2bda70c3cd5ef6421 /**@}*/