Index: firmware/App/Services/FPGA.c =================================================================== diff -u -r68aefeff8890cdfa956c7bfdf0d4505b4ac25cb7 -r37a9fd8f15e413db5337371a7d1a1cb65567af7c --- firmware/App/Services/FPGA.c (.../FPGA.c) (revision 68aefeff8890cdfa956c7bfdf0d4505b4ac25cb7) +++ firmware/App/Services/FPGA.c (.../FPGA.c) (revision 37a9fd8f15e413db5337371a7d1a1cb65567af7c) @@ -7,8 +7,8 @@ * * @file FPGA.c * -* @author (last) Sean Nash -* @date (last) 12-Nov-2021 +* @author (last) Darren Cox +* @date (last) 10-Mar-2022 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -234,6 +234,10 @@ U16 bloodStCount; ///< Reg 434. Blood leak St Count. U16 bloodLEDIntensity; ///< Reg 436. Blood leak LED intensity. U16 bloodRdCounter; ///< Reg 438. Blood leak register counter. + U16 arterialPressure; ///< Reg 440. Arterial pressure sensor. + U16 arterialPressureTemperature; ///< Reg 442. Arterial pressure sensor temperature. + U08 arterialPressureReadCount; ///< Reg 444. Arterial pressure sensor read count. + U08 arterialPressureErrorCount; ///< Reg 445. Arterial pressure sensor error count. } FPGA_SENSORS_T; /// Record structure for FPGA continuous priority writes. @@ -1552,6 +1556,57 @@ /*********************************************************************//** * @brief + * The getFPGADVTArterialPressure function gets the latest arterial pressure reading. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return last arterial pressure reading + *************************************************************************/ +U16 getFPGADVTArterialPressure( void ) +{ + return fpgaSensorReadings.arterialPressure; +} + +/*********************************************************************//** + * @brief + * The getFPGADVTArterialTemperature function gets the latest arterial pressure + * sensor temperature reading. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return last arterial pressure sensor temperature reading + *************************************************************************/ +U16 getFPGADVTArterialTemperature( void ) +{ + return fpgaSensorReadings.arterialPressureTemperature; +} + +/*********************************************************************//** + * @brief + * The getFPGADVTArterialPressureReadCounter function gets the latest arterial + * pressure sensor read counter. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return last arterial pressure sensor read counter + *************************************************************************/ +U08 getFPGADVTArterialPressureReadCounter( void ) +{ + return fpgaSensorReadings.arterialPressureReadCount; +} + +/*********************************************************************//** + * @brief + * The getFPGATDVTArterialPressureErrorCounter function gets the latest arterial + * pressure sensor error counter. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return last arterial pressure sensor error counter + *************************************************************************/ +U08 getFPGATDVTArterialPressureErrorCounter( void ) +{ + return fpgaSensorReadings.arterialPressureErrorCount; +} + +/*********************************************************************//** + * @brief * The getFPGAVenousPressure function gets the latest venous pressure reading. * The high 2 bits are status bits: 00=ok, 01=cmd mode, 10=stale data, 11=diag * The low 14 bits are data. Zero is at 1638. Values above are positive, @@ -1870,21 +1925,6 @@ /*********************************************************************//** * @brief - * The getDoorState function gets the current state of door switch. - * @details Inputs: none - * @details Outputs: none - * @return current door state - *************************************************************************/ -OPN_CLS_STATE_T getFPGADoorState( void ) -{ - // TODO: Get actual door state from FPGA or GPIO - BOOL const status = 0x0; - - return ( 0 == status ? STATE_CLOSED : STATE_OPEN ); -} - -/*********************************************************************//** - * @brief * The setFPGAValvesControlMode function sets the valves control mode. * @details Inputs: fpgaActuatorSetPoints * @details Outputs: fpgaActuatorSetPoints