Index: firmware/App/Services/FPGA.c =================================================================== diff -u -rc4597167d133bcafd1a0576d0f7c53f430d98d4b -rf9a866abfc44db38c01cb795fea894cce1042eec --- firmware/App/Services/FPGA.c (.../FPGA.c) (revision c4597167d133bcafd1a0576d0f7c53f430d98d4b) +++ firmware/App/Services/FPGA.c (.../FPGA.c) (revision f9a866abfc44db38c01cb795fea894cce1042eec) @@ -138,18 +138,18 @@ { U08 errorCountProcessor; ///< Reg 256. TBD. U08 errorCountPC; ///< Reg 257. TBD. - U08 bloodFlowMeterDataPktCount; ///< Reg 258. Blood flow sensor data packet count. (OBSOLETE) - U08 bloodFlowMeterSlowPktCounts; ///< Reg 259. Blood flow sensor slow data packet count. (OBSOLETE) - F32 bloodFlowLast; ///< Reg 260. Blood flow rate data. (OBSOLETE) - U08 bloodFlowMeterDeviceStatus; ///< Reg 264. Blood flow sensor status. (OBSOLETE) - U08 bloodFlowMeterResponse; ///< Reg 265. TBD. (OBSOLETE) - U08 dialysateFlowMeterDataPktCount; ///< Reg 266. Dialysate flow sensor data packet count. (OBSOLETE) - U08 dialysateFlowMeterSlowPckCounts; ///< Reg 267. Dialysate flow sensor slow data packet count. (OBSOLETE) - F32 dialysateFlowLast; ///< Reg 268. Dialysate flow rate data. (OBSOLETE) - U08 dialysateFlowMeterDeviceStatus; ///< Reg 272. Dialysate flow sensor status. (OBSOLETE) - U08 dialysateFlowMeterResponse; ///< Reg 273. TBD. (OBSOLETE) - U08 bloodFlowMeterErrorCount; ///< Reg 274. Blood flow sensor error count. (OBSOLETE) - U08 dialysateFlowMeterErrorCount; ///< Reg 275. Dialysate flow sensor error count. (OBSOLETE) + U08 reserved1; ///< Reg 258. Reserved. + U08 reserved2; ///< Reg 259. Reserved. + F32 reserved3; ///< Reg 260. Reserved. + U08 reserved4; ///< Reg 264. Reserved. + U08 reserved5; ///< Reg 265. Reserved. + U08 reserved6; ///< Reg 266. Reserved. + U08 reserved7; ///< Reg 267. Reserved. + F32 reserved8; ///< Reg 268. Reserved. + U08 reserved9; ///< Reg 272. Reserved. + U08 reserved10; ///< Reg 273. Reserved. + U08 reserved11; ///< Reg 274. Reserved. + U08 reserved12; ///< Reg 275. Reserved. U16 bloodOcclusionData; ///< Reg 276. Blood pump occlusion sensor data. U08 bloodOcclusionReadCount; ///< Reg 278. Blood pump occlusion sensor read count. U08 bloodOcclusionErrorCount; ///< Reg 279. Blood pump occlusion sensor error count. @@ -164,9 +164,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 bloodFlowSoundSpeedData; ///< Reg 300. Blood flow sensor - sound speed data. (OBSOLETE) - U32 bloodFlowAccFlowData; ///< Reg 304. Blood flow sensor - accumulated flow data. (OBSOLETE) - F32 bloodFlowSignalStrength; ///< Reg 308. Blood flow sensor - signal strength. (OBSOLETE) + U32 reserved13; ///< Reg 300. Reserved. + U32 reserved14; ///< Reg 304. Reserved. + F32 reserved15; ///< Reg 308. Reserved. 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. @@ -183,9 +183,9 @@ 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. (OBSOLETE) - U32 dialysateFlowAccFlowData; ///< Reg 344. Dialysate flow sensor - accumulated flow data. (OBSOLETE) - F32 dialysateFlowSignalStrength; ///< Reg 348. Dialysate flow sensor - signal strength. (OBSOLETE) + U32 reserved16; ///< Reg 340. Reserved. + U32 reserved17; ///< Reg 344. Reserved. + F32 reserved18; ///< Reg 348. Reserved. 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. @@ -227,15 +227,15 @@ U08 V4EncError; ///< Reg 423. Pinch valve V4 encoder error counter. U08 ADACounter; ///< Reg 424. ADA bubble counter. U08 ADVCounter; ///< Reg 425. ADV bubble counter. - U08 ZLeakCounter; ///< Reg 426. Blood leak zero status counter. (OBSOLETE) - U08 BLeakCounter; ///< Reg 427. Blood leak counter. (OBSOLETE) + U08 reserved19; ///< Reg 426. Reserved. + U08 reserved20; ///< Reg 427. Reserved. U08 VenousErrorCounter; ///< Reg 428. Venous error counter. - U08 bloodLeakZeroedStatus; ///< Reg 429. Blood leak and sensor zeored status. (OBSOLETE) - U16 bloodLeakDetectSetPoint; ///< Reg 430. Blood leak stored set point value. (OBSOLETE) - U16 bloodLeakDetectLevel; ///< Reg 432. Blood leak detection stored level value. (OBSOLETE) - U16 bloodLeakStCount; ///< Reg 434. Blood leak St Count. (OBSOLETE) - U16 bloodLeakLEDIntensity; ///< Reg 436. Blood leak LED intensity. (OBSOLETE) - U16 bloodLeakRdCounter; ///< Reg 438. Blood leak register counter. (OBSOLETE) + U08 reserved21; ///< Reg 429. Reserved. + U16 reserved22; ///< Reg 430. Reserved. + U16 reserved23; ///< Reg 432. Reserved. + U16 reserved24; ///< Reg 434. Reserved. + U16 reserved25; ///< Reg 436. Reserved. + U16 reserved26; ///< Reg 438. Reserved. U16 arterialPressure; ///< Reg 440. Arterial pressure sensor. U16 arterialPressureTemperature; ///< Reg 442. Arterial pressure sensor temperature. U08 arterialPressureReadCount; ///< Reg 444. Arterial pressure sensor read count. @@ -290,7 +290,7 @@ U16 fpgaVAux11Voltage; ///< Reg 534. Aux. voltage 11. F32 bloodFlowSoundSpeed; ///< Reg 536. Blood flow sound speed. F32 bloodFlowAccFlow; ///< Reg 540. Blood flow accumulated flow. - F32 bloodFlowSignalStrength; ///< Reg 544. Blood flow signal strength. + F32 reserved15; ///< Reg 544. Reserved. F32 dialysateInFlowSoundSpeed; ///< Reg 548. Dialysate inlet flow sound speed. F32 dialysateInFlowAccFlow; ///< Reg 552. Dialysate inlet flow accumulated flow. F32 dialysateInFlowSignalStrength; ///< Reg 556. Dialysate inlet flow signal strength. @@ -1283,108 +1283,6 @@ /*********************************************************************//** * @brief - * The getFPGABloodFlowSignalStrength function gets the latest blood flow - * signal strength reading. - * @details Inputs: fpgaSensorReadings2 - * @details Outputs: none - * @return last blood flow signal strength reading - *************************************************************************/ -F32 getFPGABloodFlowSignalStrength( void ) -{ - return fpgaSensorReadings.bloodFlowSignalStrength; -} - -/*********************************************************************//** - * @brief - * The getFPGADialysateFlowSignalStrength function gets the latest dialysate - * flow signal strength reading. - * @details Inputs: fpgaSensorReadings2 - * @details Outputs: none - * @return last dialysate flow signal strength reading - *************************************************************************/ -F32 getFPGADialysateFlowSignalStrength( void ) -{ - return fpgaSensorReadings.dialysateFlowSignalStrength; -} - -/*********************************************************************//** - * @brief - * The getFPGADialysateFlow function gets the latest dialysate flow reading. - * @details Inputs: fpgaSensorReadings - * @details Outputs: none - * @return last dialysate flow reading - *************************************************************************/ -F32 getFPGADialysateFlow( void ) -{ - return fpgaSensorReadings.dialysateFlowLast; -} - -/*********************************************************************//** - * @brief - * The getFPGADialysateFlowMeterStatus function gets the dialysate flow meter status. - * @details Inputs: fpgaSensorReadings - * @details Outputs: none - * @return current dialysate flow meter status - *************************************************************************/ -U08 getFPGADialysateFlowMeterStatus( void ) -{ - return fpgaSensorReadings.dialysateFlowMeterDeviceStatus; -} - -/*********************************************************************//** - * @brief - * The getFPGADialysateFlowFastPacketReadCounter function gets the dialysate - * flow meter fast packet read counter. - * @details Inputs: fpgaSensorReadings - * @details Outputs: none - * @return current dialysate flow meter fast packet read counter - *************************************************************************/ -U08 getFPGADialysateFlowFastPacketReadCounter( void ) -{ - return fpgaSensorReadings.dialysateFlowMeterDataPktCount; -} - -/*********************************************************************//** - * @brief - * The getFPGADialysateFlowSlowPacketReadCounter function gets the dialysate - * flow meter slow packet read counter. - * @details Inputs: fpgaSensorReadings - * @details Outputs: none - * @return current dialysate flow meter slow packet read counter - *************************************************************************/ -U08 getFPGADialysateFlowSlowPacketReadCounter( void ) -{ - return ( fpgaSensorReadings.dialysateFlowMeterSlowPckCounts & MASK_OFF_NIBBLE_LSB ) >> SHIFT_BITS_BY_4; -} - -/*********************************************************************//** - * @brief - * The getFPGADialysateFlowStatusPacketReadCounter function gets the dialysate - * flow meter status packet read counter. - * @details Inputs: fpgaSensorReadings - * @details Outputs: none - * @return current dialysate flow meter status packet read counter - *************************************************************************/ -U08 getFPGADialysateFlowStatusPacketReadCounter( void ) -{ - return ( fpgaSensorReadings.dialysateFlowMeterSlowPckCounts & MASK_OFF_NIBBLE_MSB ); -} - -/*********************************************************************//** - * @brief - * The getFPGADialysateFlowErrorCounter function gets the dialysate flow meter - * error counter. - * @details Inputs: fpgaSensorReadings - * @details Outputs: none - * @return current dialysate flow meter error counter - *************************************************************************/ -U08 getFPGADialysateFlowErrorCounter( void ) -{ - return fpgaSensorReadings.dialysateFlowMeterErrorCount; -} - -/*********************************************************************//** - * @brief * The getFPGABloodPumpHallSensorCount function gets the latest blood pump * hall sensor count. Count is a 16 bit free running counter. If counter is * counting up, indicates motor is running in forward direction. If counter is @@ -2022,105 +1920,6 @@ /*********************************************************************//** * @brief - * The getFPGABloodLeakZeroStatusCounter function returns the blood leak - * zero status counter - * @details Inputs: none - * @details Outputs: none - * @return fpgaSensorReadings.ZLeakCounter - *************************************************************************/ -U08 getFPGABloodLeakZeroStatusCounter( void ) -{ - return fpgaSensorReadings.ZLeakCounter; -} - -/*********************************************************************//** - * @brief - * The getFPGABloodLeakCounter function returns the blood leak counter. - * @details Inputs: none - * @details Outputs: none - * @return fpgaSensorReadings.BLeakCounter - *************************************************************************/ -U08 getFPGABloodLeakCounter( void ) -{ - return fpgaSensorReadings.BLeakCounter; -} - -/*********************************************************************//** - * @brief - * The getFPGABloodLeakZeroedStatus function returns the blood leak zeroed status. - * @details Inputs: none - * @details Outputs: none - * @return fpgaSensorReadings.bloodLeakZeroedStatus - *************************************************************************/ -U08 getFPGABloodLeakZeroedStatus( void ) -{ - return fpgaSensorReadings.bloodLeakZeroedStatus; -} - -/*********************************************************************//** - * @brief - * The getFPGABloodLeakDetectSetPoint function returns the blood leak detect - * set point. - * @details Inputs: none - * @details Outputs: none - * @return fpgaSensorReadings.bloodDetectSetPoint - *************************************************************************/ -U16 getFPGABloodLeakDetectSetPoint( void ) -{ - return fpgaSensorReadings.bloodLeakDetectSetPoint; -} - -/*********************************************************************//** - * @brief - * The getFPGABloodLeakDetectLevel function returns the blood leak detect level. - * @details Inputs: none - * @details Outputs: none - * @return fpgaSensorReadings.bloodDetectLevel - *************************************************************************/ -U16 getFPGABloodLeakDetectLevel( void ) -{ - return fpgaSensorReadings.bloodLeakDetectLevel; -} - -/*********************************************************************//** - * @brief - * The getFPGABloodLeakStCount function returns the blood leak st count. - * @details Inputs: none - * @details Outputs: none - * @return fpgaSensorReadings.bloodStCount - *************************************************************************/ -U16 getFPGABloodLeakStCount( void ) -{ - return fpgaSensorReadings.bloodLeakStCount; -} - -/*********************************************************************//** - * @brief - * The getFPGABloodLeakLEDIntensity function returns the blood leak LED intensity. - * @details Inputs: none - * @details Outputs: none - * @return fpgaSensorReadings.bloodLEDIntensity - *************************************************************************/ -U16 getFPGABloodLeakLEDIntensity( void ) -{ - return fpgaSensorReadings.bloodLeakLEDIntensity; -} - -/*********************************************************************//** - * @brief - * The getFPGABloodLeakRegisterCounter function returns the blood leak register - * counter. - * @details Inputs: none - * @details Outputs: none - * @return fpgaSensorReadings.bloodRdCounter - *************************************************************************/ -U16 getFPGABloodLeakRegisterCounter( void ) -{ - return fpgaSensorReadings.bloodLeakRdCounter; -} - -/*********************************************************************//** - * @brief * The getFPGABloodLeakTxFIFOCount function returns the blood leak transmit * FIFO count. * @details Inputs: none