Index: firmware/App/Services/FpgaDD.c =================================================================== diff -u -ra14bc308c72272ce0275d263cf010c90d8a37355 -r48c75a394c56b82886760e9a136b638edecf7572 --- firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision a14bc308c72272ce0275d263cf010c90d8a37355) +++ firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision 48c75a394c56b82886760e9a136b638edecf7572) @@ -121,102 +121,112 @@ U16 fpgaPnPressure; ///< Reg 264. Pn/PHo MPM pressure sensor RAW pressure data U16 fpgaPnTemp; ///< Reg 266. Pn/PHo MPM pressure sensor RAW temperature data - U08 fpgaPnReadCnt; ///< Reg 268. Pn/PHo Counter for good I2C transmission b/w FPGA and sensor - U08 fpgaPnErrorCnt; ///< Reg 229. Pn/PHo Counter for bad I2C transmission b/w FPGA and sensor + U08 fpgaPnReadCnt; ///< Reg 268. Pn/PHo Counter for good SPI transmission b/w FPGA and sensor + U08 fpgaPnErrorCnt; ///< Reg 229. Pn/PHo Counter for bad SPI transmission b/w FPGA and sensor U16 fpgaPCbPressure; ///< Reg 270. PCb/PDB MPM pressure sensor RAW pressure data U16 fpgaPCbTemp; ///< Reg 272. PCb/PDB MPM pressure sensor RAW temperature data - U08 fpgaPCbReadCnt; ///< Reg 274. PCb/PDB Counter for good I2C transmission b/w FPGA and sensor - U08 fpgaPCbErrorCnt; ///< Reg 275. PCb/PDB Counter for bad I2C transmission b/w FPGA and sensor + U08 fpgaPCbReadCnt; ///< Reg 274. PCb/PDB Counter for good SPI transmission b/w FPGA and sensor + U08 fpgaPCbErrorCnt; ///< Reg 275. PCb/PDB Counter for bad SPI transmission b/w FPGA and sensor U16 fpgaPDsPressure; ///< Reg 276. PDs MPM pressure sensor RAW pressure data U16 fpgaPDsTemp; ///< Reg 278. PDs MPM pressure sensor RAW temperature data - U08 fpgaPDsReadCnt; ///< Reg 280. PDs Counter for good I2C transmission b/w FPGA and sensor - U08 fpgaPDsErrorCnt; ///< Reg 281. PDs Counter for bad I2C transmission b/w FPGA and sensor + U08 fpgaPDsReadCnt; ///< Reg 280. PDs Counter for good SPI transmission b/w FPGA and sensor + U08 fpgaPDsErrorCnt; ///< Reg 281. PDs Counter for bad SPI transmission b/w FPGA and sensor U16 fpgaPDfPressure; ///< Reg 282. PDf MPM pressure sensor RAW pressure data U16 fpgaPDfTemp; ///< Reg 284. PDf MPM pressure sensor RAW temperature data - U08 fpgaPDfReadCnt; ///< Reg 286. PDf Counter for good I2C transmission b/w FPGA and sensor - U08 fpgaPDfErrorCnt; ///< Reg 287. PDf Counter for bad I2C transmission b/w FPGA and sensor + U08 fpgaPDfReadCnt; ///< Reg 286. PDf Counter for good SPI transmission b/w FPGA and sensor + U08 fpgaPDfErrorCnt; ///< Reg 287. PDf Counter for bad SPI transmission b/w FPGA and sensor U16 fpgaPtmPressure; ///< Reg 288. Ptm MPM pressure sensor RAW pressure data U16 fpgaPtmTemp; ///< Reg 290. Ptm MPM pressure sensor RAW temperature data - U08 fpgaPtmReadCnt; ///< Reg 292. Ptm Counter for good I2C transmission b/w FPGA and sensor - U08 fpgaPtmErrorCnt; ///< Reg 293. Ptm Counter for bad I2C transmission b/w FPGA and sensor + U08 fpgaPtmReadCnt; ///< Reg 292. Ptm Counter for good SPI transmission b/w FPGA and sensor + U08 fpgaPtmErrorCnt; ///< Reg 293. Ptm Counter for bad SPI transmission b/w FPGA and sensor - U32 fpgaCD1DataOut; ///< Reg 294. Data read from Conductivity Sensor 1 register - U16 fpgaCD1Cond; ///< Reg 298. CD1 conductivity - U16 fpgaCD1Temp; ///< Reg 300. CD1 Temperature - U08 fpgaCD1ReadCnt; ///< Reg 302. CD1 successful read count - U08 fpgaCD1ErrorCnt; ///< Reg 303. CD1 error read count + U16 fpgaPRiPressure; ///< Reg 294. PRi MPM pressure sensor RAW pressure data + U16 fpgaPRiTemp; ///< Reg 296. PRi MPM pressure sensor RAW temperature data + U08 fpgaPRiReadCnt; ///< Reg 298. PRi Counter for good SPI transmission b/w FPGA and sensor + U08 fpgaPRiErrorCnt; ///< Reg 299. Pri Counter for bad SPI transmission b/w FPGA and sensor - U32 fpgaCD2DataOut; ///< Reg 304. Data read from Conductivity Sensor 2 register - U16 fpgaCD2Cond; ///< Reg 308. CD2 conductivity - U16 fpgaCD2Temp; ///< Reg 310. CD2 Temperature - U08 fpgaCD2ReadCnt; ///< Reg 312. CD2 successful read count - U08 fpgaCD2ErrorCnt; ///< Reg 313. CD2 error read count + U16 fpgaPRoPressure; ///< Reg 300. PRo MPM pressure sensor RAW pressure data + U16 fpgaPRoTemp; ///< Reg 302. PRo MPM pressure sensor RAW temperature data + U08 fpgaPRoReadCnt; ///< Reg 304. PRo Counter for good SPI transmission b/w FPGA and sensor + U08 fpgaPRoErrorCnt; ///< Reg 305. PRo Counter for bad SPI transmission b/w FPGA and sensor - U32 fpgaCD3DataOut; ///< Reg 314. Data read from Conductivity Sensor 3 register - U16 fpgaCD3Cond; ///< Reg 318. CD3 conductivity - U16 fpgaCD3Temp; ///< Reg 320. CD3 Temperature - U08 fpgaCD3ReadCnt; ///< Reg 322. CD3 successful read count - U08 fpgaCD3ErrorCnt; ///< Reg 323. CD3 error read count + U32 fpgaCD1DataOut; ///< Reg 306. Data read from Conductivity Sensor 1 register + U16 fpgaCD1Cond; ///< Reg 310. CD1 conductivity + U16 fpgaCD1Temp; ///< Reg 312. CD1 Temperature + U08 fpgaCD1ReadCnt; ///< Reg 314. CD1 successful read count + U08 fpgaCD1ErrorCnt; ///< Reg 315. CD1 error read count - U32 fpgaCD4DataOut; ///< Reg 324. Data read from Conductivity Sensor 4 register - U16 fpgaCD4Cond; ///< Reg 328. CD4 conductivity - U16 fpgaCD4Temp; ///< Reg 330. CD4 Temperature - U08 fpgaCD4ReadCnt; ///< Reg 332. CD4 successful read count - U08 fpgaCD4ErrorCnt; ///< Reg 333. CD4 error read count + U32 fpgaCD2DataOut; ///< Reg 316. Data read from Conductivity Sensor 2 register + U16 fpgaCD2Cond; ///< Reg 320. CD2 conductivity + U16 fpgaCD2Temp; ///< Reg 322. CD2 Temperature + U08 fpgaCD2ReadCnt; ///< Reg 324. CD2 successful read count + U08 fpgaCD2ErrorCnt; ///< Reg 325. CD2 error read count - U16 fpgaLevelSensor1; ///< Reg 334. Level Sensor 1 - U16 fpgaLevelSensor2; ///< Reg 336. Level Sensor 2 + U32 fpgaCD3DataOut; ///< Reg 326. Data read from Conductivity Sensor 3 register + U16 fpgaCD3Cond; ///< Reg 330. CD3 conductivity + U16 fpgaCD3Temp; ///< Reg 332. CD3 Temperature + U08 fpgaCD3ReadCnt; ///< Reg 334. CD3 successful read count + U08 fpgaCD3ErrorCnt; ///< Reg 335. CD3 error read count - U08 fpgaHallSensInputs; ///< Reg 338. Hall sensor Inputs + U32 fpgaCD4DataOut; ///< Reg 336. Data read from Conductivity Sensor 4 register + U16 fpgaCD4Cond; ///< Reg 340. CD4 conductivity + U16 fpgaCD4Temp; ///< Reg 342. CD4 Temperature + U08 fpgaCD4ReadCnt; ///< Reg 344. CD4 successful read count + U08 fpgaCD4ErrorCnt; ///< Reg 345. CD4 error read count - U08 fpgaBldTxFIFOCnt; ///< Reg 339. Blood leak sensor transmit FIFO count - U16 fpgaBldRxErrorCnt; ///< Reg 340. Blood leak sensor Receive error count - U16 fpgaBldRxFIFOCnt; ///< Reg 342. Blood leak sensor Receive FIFO count - U08 fpgaBldRxFIFODataOut; ///< Reg 344. Blood leak sensor Receive data - U08 fpgaBldPulseStatus; ///< Reg 345. Blood leak sensor status + U16 fpgaLevelSensor1; ///< Reg 346. Level Sensor 1 + U16 fpgaLevelSensor2; ///< Reg 348. Level Sensor 2 - U16 fpgaValveStates; ///< Reg 346. Valve status read - U16 fpgaValvePWMEnableStates; ///< Reg 348. Valve PWM Enable status read - U08 fpgaValveBCStates; ///< Reg 350. Balancing chamber Valves states - U08 fpgaValveBCPWMStates; ///< Reg 351. Balancing Chamber Valve PWM states - U08 fpgaValveUFStates; ///< Reg 352. Ultrafiltration Valves states - U08 fpgaValveUFPWMStates; ///< Reg 353. Ultrafiltration Valves PWM states - U08 fpgaCPACPBFault; ///< Reg 354. Concentrate pump fault register for CPA and CPB - U16 fpgaCPAHallSense; ///< Reg 355. Concentrate pump CPA hall sensor pulse width - U16 fpgaCPBHallSense; ///< Reg 357. Concentrate pump CPB hall sensor pulse width + U08 fpgaHallSensInputs; ///< Reg 350. Hall sensor Inputs - F32 fpgaTax1Temp; ///< Reg 359. Inlet heat exchanger temperature - F32 fpgaTH2Temp; ///< Reg 363. Inlet heat exchanger temperature - F32 fpgaTH1Temp; ///< Reg 367. Hydraulics primary heater temperature - F32 fpgaTH3Temp; ///< Reg 371. Trimmer heater temperature - U08 fpgaRTDReadCnt; ///< Reg 375. Read count for all RTD sensors + U08 fpgaBldTxFIFOCnt; ///< Reg 351. Blood leak sensor transmit FIFO count + U16 fpgaBldRxErrorCnt; ///< Reg 352. Blood leak sensor Receive error count + U16 fpgaBldRxFIFOCnt; ///< Reg 354. Blood leak sensor Receive FIFO count + U08 fpgaBldRxFIFODataOut; ///< Reg 356. Blood leak sensor Receive data + U08 fpgaBldPulseStatus; ///< Reg 357. Blood leak sensor status - U08 fpgaBaroReadCount; ///< Reg 376. Barometric sensor read count - U08 fpgaBaroErrorCount; ///< Reg 377. Barometric sensor error count - U16 fpgaBaroManufacInfo; ///< Reg 378. Barometric sensor manufacturing information - U16 fpgaBaroPROMCoeff1; ///< Reg 380. Barometric sensor PROM coefficient 1 - U16 fpgaBaroPROMCoeff2; ///< Reg 382. Barometric sensor PROM coefficient 2 - U16 fpgaBaroPROMCoeff3; ///< Reg 384. Barometric sensor PROM coefficient 3 - U16 fpgaBaroPROMCoeff4; ///< Reg 386. Barometric sensor PROM coefficient 4 - U16 fpgaBaroPROMCoeff5; ///< Reg 390. Barometric sensor PROM coefficient 5 - U16 fpgaBaroPROMCoeff6; ///< Reg 392. Barometric sensor PROM coefficient 6 - U16 fpgaBaroPROMCRC; ///< Reg 394. Barometric sensor PROM CRC - U32 fpgaBaroPressure; ///< Reg 396. Barometric sensor pressure value - U32 fpgaBaroTemperature; ///< Reg 400. Barometric sensor temperature sensor + U16 fpgaValveStates; ///< Reg 358. Valve status read + U16 fpgaValvePWMEnableStates; ///< Reg 360. Valve PWM Enable status read + U08 fpgaValveBCStates; ///< Reg 362. Balancing chamber Valves states + U08 fpgaValveBCPWMStates; ///< Reg 363. Balancing Chamber Valve PWM states + U08 fpgaValveUFStates; ///< Reg 364. Ultrafiltration Valves states + U08 fpgaValveUFPWMStates; ///< Reg 365. Ultrafiltration Valves PWM states + U08 fpgaCPACPBFault; ///< Reg 366. Concentrate pump fault register for CPA and CPB + U16 fpgaCPAHallSense; ///< Reg 367. Concentrate pump CPA hall sensor pulse width + U16 fpgaCPBHallSense; ///< Reg 369. Concentrate pump CPB hall sensor pulse width - U16 fpgaDGPMeasuredSpeed; ///< Reg 404. Fresh dialysate pump measured speed - U16 fpgaSDPMeasuredSpeed; ///< Reg 406. Spent dialysate pump measured speed - U08 fpgaDGPSDPPumpStatus; ///< Reg 408. Dialysate pumps Error status - U16 fpgaDGPCurrentFeedback; ///< Reg 409. Fresh dialysate pump current feedback - U16 fpgaSDPCurrentFeedback; ///< Reg 411. Spent dialysate pump current feedback - U08 fpgaDGPHallStatus; ///< Reg 413. Fresh dialysate pump hall sensor direction status - U08 fpgaSDPHallStatus; ///< Reg 414. Spent dialysate pump hall sensor direction status - U08 fpgaFloater1Status; ///< Reg 415. Floater 1 level sensor status - U08 fpgaFloater2Status; ///< Reg 416. Floater 2 level sensor status + F32 fpgaTax1Temp; ///< Reg 371. Inlet heat exchanger temperature + F32 fpgaTH2Temp; ///< Reg 375. Inlet heat exchanger temperature + F32 fpgaTH1Temp; ///< Reg 379. Hydraulics primary heater temperature + F32 fpgaTH3Temp; ///< Reg 383. Trimmer heater temperature + U08 fpgaRTDReadCnt; ///< Reg 387. Read count for all RTD sensors + + U08 fpgaBaroReadCount; ///< Reg 388. Barometric sensor read count + U08 fpgaBaroErrorCount; ///< Reg 389. Barometric sensor error count + U16 fpgaBaroManufacInfo; ///< Reg 390. Barometric sensor manufacturing information + U16 fpgaBaroPROMCoeff1; ///< Reg 392. Barometric sensor PROM coefficient 1 + U16 fpgaBaroPROMCoeff2; ///< Reg 394. Barometric sensor PROM coefficient 2 + U16 fpgaBaroPROMCoeff3; ///< Reg 396. Barometric sensor PROM coefficient 3 + U16 fpgaBaroPROMCoeff4; ///< Reg 398. Barometric sensor PROM coefficient 4 + U16 fpgaBaroPROMCoeff5; ///< Reg 400. Barometric sensor PROM coefficient 5 + U16 fpgaBaroPROMCoeff6; ///< Reg 402. Barometric sensor PROM coefficient 6 + U16 fpgaBaroPROMCRC; ///< Reg 404. Barometric sensor PROM CRC + U32 fpgaBaroPressure; ///< Reg 406. Barometric sensor pressure value + U32 fpgaBaroTemperature; ///< Reg 410. Barometric sensor temperature sensor + + U16 fpgaDGPMeasuredSpeed; ///< Reg 414. Fresh dialysate pump measured speed + U16 fpgaSDPMeasuredSpeed; ///< Reg 416. Spent dialysate pump measured speed + U08 fpgaDGPSDPPumpStatus; ///< Reg 418. Dialysate pumps Error status + U16 fpgaDGPCurrentFeedback; ///< Reg 419. Fresh dialysate pump current feedback + U16 fpgaSDPCurrentFeedback; ///< Reg 421. Spent dialysate pump current feedback + U08 fpgaDGPHallStatus; ///< Reg 423. Fresh dialysate pump hall sensor direction status + U08 fpgaSDPHallStatus; ///< Reg 424. Spent dialysate pump hall sensor direction status + U08 fpgaFloater1Status; ///< Reg 425. Floater 1 level sensor status + U08 fpgaFloater2Status; ///< Reg 426. Floater 2 level sensor status } DD_FPGA_SENSORS_T; typedef struct @@ -265,35 +275,39 @@ U16 fpgaVHiPWMLow; ///< Reg 80. VHi PWM low U16 fpgaVHiPWMPeriod; ///< Reg 82. VHi PWM period U16 fpgaVHiPWMPullin; ///< Reg 84. VHi PWM pull in + U16 fpgaVWiPWMLow; ///< Reg 86. VWi PWM low + U16 fpgaVWiPWMPeriod; ///< Reg 88. VWi PWM period + U16 fpgaVWiPWMPullin; ///< Reg 90. VWi PWM pull in - U08 fpgaBCValveControl; ///< Reg 86. Balancing Chamber Valves Control Registers - U08 fpgaBCValvePWMControl; ///< Reg 87. Balancing Chamber Valves PWM control - U08 fpgaUFValveControl; ///< Reg 88. Ultra filtration Valves Control Registers - U08 fpgaUFValvePWMControl; ///< Reg 89. Ultra filtration Valves PWM control - U08 fpgaConSensTD12Control; ///< Reg 90. Conductivity/Temperature Sensors 1 & 2 Control registers - U08 fpgaConSensTD34Control; ///< Reg 91. Conductivity/Temperature Sensors 3 & 4 Control registers - U16 fpgaConSensTD12_Addrs; ///< Reg 92. CDTD 1&2 Initialization Address register - U32 fpgaConSensTD12_Data_In; ///< Reg 94. CDTD 1&2 Initialization data register - U16 fpgaConSensTD34_Addrs; ///< Reg 98. CDTD 3&4 Initialization Address register - U32 fpgaConSensTD34_Data_In; ///< Reg 100. CDTD 3&4 Initialization data register + U08 fpgaBCValveControl; ///< Reg 92. Balancing Chamber Valves Control Registers + U08 fpgaBCValvePWMControl; ///< Reg 93. Balancing Chamber Valves PWM control + U08 fpgaUFValveControl; ///< Reg 94. Ultra filtration Valves Control Registers + U08 fpgaUFValvePWMControl; ///< Reg 95. Ultra filtration Valves PWM control - U16 fpgaRemoteUpdate_Write; ///< Reg 104.Register for Remote update used by SW. + U08 fpgaConSensTD12Control; ///< Reg 96. Conductivity/Temperature Sensors 1 & 2 Control registers + U08 fpgaConSensTD34Control; ///< Reg 97. Conductivity/Temperature Sensors 3 & 4 Control registers + U16 fpgaConSensTD12_Addrs; ///< Reg 98. CDTD 1&2 Initialization Address register + U32 fpgaConSensTD12_Data_In; ///< Reg 100. CDTD 1&2 Initialization data register + U16 fpgaConSensTD34_Addrs; ///< Reg 104. CDTD 3&4 Initialization Address register + U32 fpgaConSensTD34_Data_In; ///< Reg 106. CDTD 3&4 Initialization data register - U16 fpgaDGPSpeed; ///< Reg 106. DGP Speed/RPM Control - U08 fpgaDGPControl; ///< Reg 108. DGP Control - U08 fpgaSDPControl; ///< Reg 109. SDP Control - U16 fpgaSDPSpeed; ///< Reg 110. SDP Speed/RPM Control - U16 fpgaCPASpeed; ///< Reg 112. Acid Concentrate Pump Speed/RPM Control - U08 fpgaCPAControl; ///< Reg 114. Acid Concentrate Pump Control - U08 fpgaCPBControl; ///< Reg 115. BiCarb Concentrate Pump Control - U16 fpgaCPBSpeed; ///< Reg 116. BiCarb Concentrate Pump Speed/RPM Control + U16 fpgaRemoteUpdate_Write; ///< Reg 110.Register for Remote update used by SW. - U08 fpgaBloodLeakSensorTest; ///< Reg 118. Blood leak sensor test - U08 fpgaBloodLeakUARTControl; ///< Reg 119. Blood leak sensor UART control - U08 fpgaBloodLeakFIFOTx; ///< Reg 120. Blood leak sensor FIFO transmit control - U08 fpgaPrimaryHeaterPWMControl; ///< Reg 121. Primary heater PWM control - U08 fpgaTrimmerHeaterPWMControl; ///< Reg 122. Trimmer heater PWM control + U16 fpgaDGPSpeed; ///< Reg 112. DGP Speed/RPM Control + U08 fpgaDGPControl; ///< Reg 114. DGP Control + U08 fpgaSDPControl; ///< Reg 115. SDP Control + U16 fpgaSDPSpeed; ///< Reg 116. SDP Speed/RPM Control + U16 fpgaCPASpeed; ///< Reg 118. Acid Concentrate Pump Speed/RPM Control + U08 fpgaCPAControl; ///< Reg 120. Acid Concentrate Pump Control + U08 fpgaCPBControl; ///< Reg 121. BiCarb Concentrate Pump Control + U16 fpgaCPBSpeed; ///< Reg 122. BiCarb Concentrate Pump Speed/RPM Control + + U08 fpgaBloodLeakSensorTest; ///< Reg 124. Blood leak sensor test + U08 fpgaBloodLeakUARTControl; ///< Reg 125. Blood leak sensor UART control + U08 fpgaBloodLeakFIFOTx; ///< Reg 126. Blood leak sensor FIFO transmit control + U08 fpgaPrimaryHeaterPWMControl; ///< Reg 127. Primary heater PWM control + U08 fpgaTrimmerHeaterPWMControl; ///< Reg 128. Trimmer heater PWM control } FPGA_ACTUATORS_T; #pragma pack(pop) @@ -431,7 +445,8 @@ * 10 - VDo.\n * 11 - VP2.\n * 12 - VHi.\n - * 13..15 - reserved or unused. + * 13 - VWi.\n + * 14..15 - reserved or unused. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.fpgaValveControl * @param valveStates bit mask for the various valve states @@ -1204,7 +1219,7 @@ /*********************************************************************//** * @brief * The setFPGACD12Data function sets the conductivity sensor - * CD12 data input for write operations. + * CD12 data outputfor write operations. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.fpgaConSensTD12_Data_In * @param data The conductivity sensor CD12 Data @@ -1218,7 +1233,7 @@ /*********************************************************************//** * @brief * The setFPGACD34Data function sets the conductivity sensor - * CD34 data input for write operations. + * CD34 data outputfor write operations. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.fpgaConSensTD34_Data_In * @param data The conductivity sensor CD34 Data @@ -1613,7 +1628,7 @@ /*********************************************************************//** * @brief * The getFPGAPnReadCount function gets hydraulics outlet pressure sensor counter of - * good I2C transmissions between FPGA and Sensor. + * good SPI transmissions between FPGA and Sensor. * @details \b Inputs: fpgaSensorReadings.fpgaPnReadCnt * @details \b Outputs: none * @return Latest hydraulics outlet Pressure sensor read count @@ -1664,7 +1679,7 @@ /*********************************************************************//** * @brief * The getFPGAPCbReadCount function gets Bibag pressure sensor counter of - * good I2C transmissions between FPGA and Sensor. + * good SPI transmissions between FPGA and Sensor. * @details \b Inputs: fpgaSensorReadings.fpgaPCbReadCnt * @details \b Outputs: none * @return Latest Bibag Pressure sensor read count @@ -1715,7 +1730,7 @@ /*********************************************************************//** * @brief * The getFPGAPDsReadCount function gets spent dialysate pressure sensor counter of - * good I2C transmissions between FPGA and Sensor. + * good SPI transmissions between FPGA and Sensor. * @details \b Inputs: fpgaSensorReadings.fpgaPDsReadCnt * @details \b Outputs: none * @return Latest spent dialysate Pressure sensor read count @@ -1766,7 +1781,7 @@ /*********************************************************************//** * @brief * The getFPGAPDfReadCount function gets fresh dialysate pressure sensor counter of - * good I2C transmissions between FPGA and Sensor. + * good SPI transmissions between FPGA and Sensor. * @details \b Inputs: fpgaSensorReadings.fpgaPDfReadCnt * @details \b Outputs: none * @return Latest fresh dialysate Pressure sensor read count @@ -1817,7 +1832,7 @@ /*********************************************************************//** * @brief * The getFPGAPtmReadCount function gets transmembrane pressure sensor counter of - * good I2C transmissions between FPGA and Sensor. + * good SPI transmissions between FPGA and Sensor. * @details \b Inputs: fpgaSensorReadings.fpgaPtmReadCnt * @details \b Outputs: none * @return Latest transmembrane Pressure sensor read count @@ -1867,6 +1882,110 @@ /*********************************************************************//** * @brief + * The getFPGAPRiRawPressure function gets water inlet input pressure sensor + * raw pressure value. + * @details \b Inputs: fpgaSensorReadings.fpgaPRiPressure + * @details \b Outputs: none + * @return Latest water inlet input pressure sensor raw pressure data + *************************************************************************/ +U16 getFPGAPRiRawPressure( void ) +{ + return fpgaSensorReadings.fpgaPRiPressure; +} + +/*********************************************************************//** + * @brief + * The getFPGAPRiRawTemperature function gets water inlet input pressure sensor + * raw temperature value. + * @details \b Inputs: fpgaSensorReadings.fpgaPRiTemp + * @details \b Outputs: none + * @return Latest water inlet input pressure sensor raw temperature data + *************************************************************************/ +U16 getFPGAPRiRawTemperature( void ) +{ + return fpgaSensorReadings.fpgaPRiTemp; +} + +/*********************************************************************//** + * @brief + * The getFPGAPRiReadCount function gets water inlet input pressure sensor + * counter of good SPI transmissions between FPGA and Sensor. + * @details \b Inputs: fpgaSensorReadings.fpgaPRiReadCnt + * @details \b Outputs: none + * @return Latest water inlet input pressure sensor read count + *************************************************************************/ +U08 getFPGAPRiReadCount( void ) +{ + return fpgaSensorReadings.fpgaPRiReadCnt; +} + +/*********************************************************************//** + * @brief + * The getFPGAPRiErrorCount function gets water inlet input pressure + * sensor error count. + * @details \b Inputs: fpgaSensorReadings.fpgaPRiErrorCnt + * @details \b Outputs: none + * @return Latest water inlet input pressure sensor read error count + *************************************************************************/ +U08 getFPGAPRiErrorCount( void ) +{ + return fpgaSensorReadings.fpgaPRiErrorCnt; +} + +/*********************************************************************//** + * @brief + * The getFPGAPRoRawPressure function gets water inlet output pressure sensor + * raw pressure value. + * @details \b Inputs: fpgaSensorReadings.fpgaPRoPressure + * @details \b Outputs: none + * @return Latest water inlet output pressure sensor raw pressure data + *************************************************************************/ +U16 getFPGAPRoRawPressure( void ) +{ + return fpgaSensorReadings.fpgaPRoPressure; +} + +/*********************************************************************//** + * @brief + * The getFPGAPRoRawTemperature function gets water inlet output pressure sensor + * raw temperature value. + * @details \b Inputs: fpgaSensorReadings.fpgaPRoTemp + * @details \b Outputs: none + * @return Latest water inlet output pressure sensor raw temperature data + *************************************************************************/ +U16 getFPGAPRoRawTemperature( void ) +{ + return fpgaSensorReadings.fpgaPRoTemp; +} + +/*********************************************************************//** + * @brief + * The getFPGAPRoReadCount function gets water inlet output pressure sensor + * counter of good SPI transmissions between FPGA and Sensor. + * @details \b Inputs: fpgaSensorReadings.fpgaPRoReadCnt + * @details \b Outputs: none + * @return Latest water inlet output pressure sensor read count + *************************************************************************/ +U08 getFPGAPRoReadCount( void ) +{ + return fpgaSensorReadings.fpgaPRoReadCnt; +} + +/*********************************************************************//** + * @brief + * The getFPGAPRoErrorCount function gets water inlet output pressure + * sensor error count. + * @details \b Inputs: fpgaSensorReadings.fpgaPRoErrorCnt + * @details \b Outputs: none + * @return Latest water inlet output pressure sensor read error count + *************************************************************************/ +U08 getFPGAPRoErrorCount( void ) +{ + return fpgaSensorReadings.fpgaPRoErrorCnt; +} + +/*********************************************************************//** + * @brief * The getFPGACD1ReadCount function gets CD1 conductivity sensor read count. * @details \b Inputs: fpgaSensorReadings.fpgaCD1ReadCnt * @details \b Outputs: none