Index: firmware/App/Services/FPGA.c =================================================================== diff -u -rd91a24c730aeb5cd7e3eba9ef4eca78e442911f8 -rc9e1a93ccd8cfbdc9737c8ffc9e6a3dbe9ba7c44 --- firmware/App/Services/FPGA.c (.../FPGA.c) (revision d91a24c730aeb5cd7e3eba9ef4eca78e442911f8) +++ firmware/App/Services/FPGA.c (.../FPGA.c) (revision c9e1a93ccd8cfbdc9737c8ffc9e6a3dbe9ba7c44) @@ -1232,28 +1232,33 @@ /*********************************************************************//** * @brief * The getFPGAArterialPressure function gets the latest arterial pressure reading. + * High byte indicates alarm status for ADC channel. + * Low 24-bits are channel reading. Subtract 2^23 from low 24 bits to get + * signed channel reading. * @details * Inputs : fpgaSensorReadings * Outputs : none * @return last arterial pressure reading *************************************************************************/ -S32 getFPGAArterialPressure( void ) +U32 getFPGAArterialPressure( void ) { - return (S32)( fpgaSensorReadings.adc1Channel0 & MASK_OFF_U32_MSB ) - 0x800000; + return fpgaSensorReadings.adc1Channel0; } /*********************************************************************//** * @brief * The getFPGAVenousPressure function gets the venous arterial 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, + * below are negative. * @details * Inputs : fpgaSensorReadings * Outputs : none * @return last venous pressure reading *************************************************************************/ U16 getFPGAVenousPressure( void ) { - // 14-bits - return fpgaSensorReadings.venousPressure & 0x3FFF; + return fpgaSensorReadings.venousPressure; } /*********************************************************************//**