Index: firmware/App/Services/FPGA.c =================================================================== diff -u -rffb9960f7b97e71ba78844c60158d344c909db94 -rb5756e5b5041288a2e95585990cce5a93756d693 --- firmware/App/Services/FPGA.c (.../FPGA.c) (revision ffb9960f7b97e71ba78844c60158d344c909db94) +++ firmware/App/Services/FPGA.c (.../FPGA.c) (revision b5756e5b5041288a2e95585990cce5a93756d693) @@ -119,9 +119,9 @@ U08 dialInPumpHallSensorStatus; ///< Reg 291. Dialysate inlet pump hall sensor status. U32 adc1Channel0; ///< Reg 292. ADC1 channel 0 data. U32 adc1Channel1; ///< Reg 296. ADC1 channel 1 data. - U32 adc1Channel2; ///< Reg 300. ADC1 channel 2 data. - U32 adc1Channel3; ///< Reg 304. ADC1 channel 3 data. - U32 adc1channel4; ///< Reg 308. ADC1 channel 4 data. + U32 bloodFlowSoundSpeedData; ///< Reg 300. Blood flow sensor - sound speed data. + U32 bloodFlowAccFlowData; ///< Reg 304. Blood flow sensor - accumualted flow data. + F32 bloodFlowSignalStrength; ///< Reg 308. Blood flow sensor - signal strength. U08 adc1SequenceCount; ///< Reg 312. ADC1 round robin channel sequence count. U08 adc1ErrorCount; ///< Reg 313. ADC1 error count. U16 accelX; ///< Reg 314. Accelerometer X axis data. @@ -138,6 +138,23 @@ U08 dialOutPumpSensorStatus; ///< Reg 335. Dialysate outlet pump hall sensor status. U16 dialInPumpHallSensorCount; ///< Reg 336. Dialysate inlet pump hall sensor count. U16 dialOutPumpHallSensorCount; ///< Reg 338. Dialysate outlet pump hall sensor count. + U32 dialysateFlowSoundSpeedData; ///< Reg 340. Dialysate flow sensor - sound speed data. + U32 dialysateFlowAccFlowData; ///< Reg 344. Dialysate flow sensor - accumualted flow data. + F32 dialysateFlowSignalStrength; ///< Reg 348. Dialysate flow sensor - signal strength. + U16 fan1PulseTime; ///< Reg 352. Fan 1 pulse time in 2.5 uSec resolution. 0xFFFF if fan RPM < 500 RPM. + U16 fan2PUlseTime; ///< Reg 354. Fan 2 pulse time in 2.5 uSec resolution. 0xFFFF if fan RPM < 500 RPM. + U16 fpgaGPIO; ///< Reg 356. FPGA GPIO register. + S16 VBaPosition; ///< Reg 358. Encoder position from VBA pinch valve. 0 until PID interface is enabled. + S16 VBvPosition; ///< Reg 360. Encoder position from VBV pinch valve. 0 until PID interface is enabled. + S16 VDioPosition; ///< Reg 362. Encoder position from VDio pinch valve. 0 until PID interface is enabled. + S16 VDzrPosition; ///< Reg 364. Encoder position from VDZR pinch valve. 0 until PID interface is enabled. + S16 VDfPosition; ///< Reg 366. Encoder position from VDf pinch valve. 0 until PID interface is enabled. + U16 valveStatus; ///< Reg 368. Valve status register. + U16 VBaPWMTarget; ///< Reg 370. PWM target duty cycle for VBA pinch valve. + U16 VBvPWMTarget; ///< Reg 372. PWM target duty cycle for VBV pinch valve. + U16 VDioPWMTarget; ///< Reg 374. PWM target duty cycle for VDio pinch valve. + U16 VDzrPWMTarget; ///< Reg 376. PWM target duty cycle for VDZR pinch valve. + U16 VDfPWMTarget; ///< Reg 378. PWM target duty cycle for VDF pinch valve. } FPGA_SENSORS_T; /// Record structure for FPGA continuous priority writes. @@ -1005,7 +1022,6 @@ fpgaHeader.fpgaControl = ctrl; } -#ifdef READ_FPGA_ASYNC_DATA /*********************************************************************//** * @brief * The getFPGABloodFlowSignalStrength function gets the latest blood flow \n @@ -1017,7 +1033,7 @@ *************************************************************************/ F32 getFPGABloodFlowSignalStrength( void ) { - return fpgaSensorReadingsAsync.bloodFlowSignalStrength; + return fpgaSensorReadings.bloodFlowSignalStrength; } /*********************************************************************//** @@ -1031,9 +1047,8 @@ *************************************************************************/ F32 getFPGADialysateFlowSignalStrength( void ) { - return fpgaSensorReadingsAsync.dialysateInFlowSignalStrength; + return fpgaSensorReadings.dialysateFlowSignalStrength; } -#endif /*********************************************************************//** * @brief