Index: firmware/App/Services/FPGA.c =================================================================== diff -u -ra7bf3ca23ea37a61000379facae628a31b3ecc59 -rf308cc4c35eab630ebbbde405cfe47d049afeafb --- firmware/App/Services/FPGA.c (.../FPGA.c) (revision a7bf3ca23ea37a61000379facae628a31b3ecc59) +++ firmware/App/Services/FPGA.c (.../FPGA.c) (revision f308cc4c35eab630ebbbde405cfe47d049afeafb) @@ -7,8 +7,8 @@ * * @file FPGA.c * -* @author (last) Sean Nash -* @date (last) 15-Jun-2020 +* @author (last) Quang Nguyen +* @date (last) 21-Jul-2020 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -44,7 +44,7 @@ #define FPGA_HEADER_START_ADDR 0x0000 #define FPGA_BULK_READ_START_ADDR 0x0100 -#define FPGA_BULK_WRITE_START_ADDR 0x000C +#define FPGA_BULK_WRITE_START_ADDR 0x000E #define FPGA_WRITE_CMD_BUFFER_LEN (FPGA_PAGE_SIZE+8) #define FPGA_READ_CMD_BUFFER_LEN 8 @@ -76,7 +76,9 @@ typedef struct { U08 fpgaId; ///< Reg 0. FPGA ID code. Checked against expected value at power up to verify basic FPGA communication and operation. - U08 fpgaRev; ///< Reg 1. FPGA revision being reported. + U08 fpgaRev; ///< Reg 1. FPGA revision being reported. + U08 fpgaRevLab; ///< Reg 2. FPGA lab rev number. + U08 fpgaRevMajor; ///< Reg 3. FPGA minor rev number. } FPGA_HEADER_T; // read only on FPGA typedef struct // TODO - add all sensor readings to this structure per FPGA register map @@ -215,7 +217,6 @@ * @details * Inputs : none * Outputs : FPGA module initialized. - * @param none * @return none *************************************************************************/ void initFPGA( void ) @@ -332,7 +333,6 @@ * @details * Inputs : none * Outputs : fpga comm flags & counters reset - * @param none * @return none *************************************************************************/ static void resetFPGACommFlags( void ) @@ -353,7 +353,6 @@ * @details * Inputs : none * Outputs : fpgaReceiptCounter - * @param none * @return none *************************************************************************/ void signalFPGAReceiptCompleted( void ) @@ -389,7 +388,6 @@ * @details * Inputs : none * Outputs : fpgaReceiptCounter - * @param none * @return none *************************************************************************/ void signalFPGATransmitCompleted( void ) @@ -403,7 +401,6 @@ * @details * Inputs : fpgaState * Outputs : fpgaState - * @param none * @return none *************************************************************************/ void execFPGAIn( void ) @@ -432,7 +429,7 @@ default: if ( fpgaState >= NUM_OF_FPGA_STATES ) { - SET_ALARM_WITH_2_U32_DATA( ALARM_ID_SOFTWARE_FAULT, SW_FAULT_ID_FPGA_INVALID_IN_STATE, fpgaState ) + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, SW_FAULT_ID_FPGA_INVALID_IN_STATE, fpgaState ) } else { @@ -457,7 +454,6 @@ * @details * Inputs : fpgaState * Outputs : fpgaState - * @param none * @return none *************************************************************************/ void execFPGAOut( void ) @@ -482,7 +478,7 @@ default: if ( fpgaState >= NUM_OF_FPGA_STATES ) { - SET_ALARM_WITH_2_U32_DATA( ALARM_ID_SOFTWARE_FAULT, SW_FAULT_ID_FPGA_INVALID_OUT_STATE, fpgaState ) + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, SW_FAULT_ID_FPGA_INVALID_OUT_STATE, fpgaState ) } else { @@ -499,7 +495,6 @@ * @details * Inputs : none * Outputs : read command sent to FPGA - * @param none * @return next FPGA state *************************************************************************/ static FPGA_STATE_T handleFPGAReadHeaderState( void ) @@ -532,7 +527,6 @@ * @details * Inputs : none * Outputs : header register values updated - * @param none * @return next FPGA state *************************************************************************/ static FPGA_STATE_T handleFPGAReceiveHeaderState( void ) @@ -585,7 +579,6 @@ * @details * Inputs : actuator set points * Outputs : actuator set points sent to FPGA - * @param none * @return next FPGA state *************************************************************************/ static FPGA_STATE_T handleFPGAWriteAllActuatorsState( void ) @@ -601,21 +594,25 @@ memcpy( &( fpgaWriteCmdBuffer[ FPGA_WRITE_CMD_HDR_LEN ] ), &fpgaActuatorSetPoints, sizeof( FPGA_ACTUATORS_T ) ); crc = crc16( fpgaWriteCmdBuffer, FPGA_WRITE_CMD_HDR_LEN + sizeof( FPGA_ACTUATORS_T ) ); fpgaWriteCmdBuffer[ FPGA_WRITE_CMD_HDR_LEN + sizeof( FPGA_ACTUATORS_T ) ] = GET_MSB_OF_WORD( crc ); - fpgaWriteCmdBuffer[ FPGA_WRITE_CMD_HDR_LEN + sizeof( FPGA_ACTUATORS_T ) + 1 ] = GET_LSB_OF_WORD( crc ); + fpgaWriteCmdBuffer[ FPGA_WRITE_CMD_HDR_LEN + sizeof( FPGA_ACTUATORS_T ) + 1 ] = GET_LSB_OF_WORD( crc ); + // construct bulk read command to read sensor data registers starting at address 8 fpgaReadCmdBuffer[ 0 ] = FPGA_READ_CMD_CODE; fpgaReadCmdBuffer[ 1 ] = GET_LSB_OF_WORD( FPGA_BULK_READ_START_ADDR ); fpgaReadCmdBuffer[ 2 ] = GET_MSB_OF_WORD( FPGA_BULK_READ_START_ADDR ); fpgaReadCmdBuffer[ 3 ] = sizeof(DG_FPGA_SENSORS_T); crc = crc16( fpgaReadCmdBuffer, FPGA_READ_CMD_HDR_LEN ); fpgaReadCmdBuffer[ 4 ] = GET_MSB_OF_WORD( crc ); - fpgaReadCmdBuffer[ 5 ] = GET_LSB_OF_WORD( crc ); + fpgaReadCmdBuffer[ 5 ] = GET_LSB_OF_WORD( crc ); + // prep DMA for sending the bulk write cmd and receiving its response setupDMAForWriteCmd( FPGA_WRITE_CMD_HDR_LEN + sizeof( FPGA_ACTUATORS_T ) + FPGA_CRC_LEN ); - setupDMAForWriteResp( FPGA_WRITE_RSP_HDR_LEN + FPGA_CRC_LEN ); + setupDMAForWriteResp( FPGA_WRITE_RSP_HDR_LEN + FPGA_CRC_LEN ); + // prep DMA for sending the bulk read cmd and receiving its response setupDMAForReadCmd( FPGA_READ_CMD_HDR_LEN + FPGA_CRC_LEN ); - setupDMAForReadResp( FPGA_READ_RSP_HDR_LEN + sizeof( DG_FPGA_SENSORS_T ) + FPGA_CRC_LEN ); + setupDMAForReadResp( FPGA_READ_RSP_HDR_LEN + sizeof( DG_FPGA_SENSORS_T ) + FPGA_CRC_LEN ); + // set fpga comm flags for bulk write cmd and follow-up bulk read command fpgaWriteCommandInProgress = TRUE; fpgaBulkWriteAndReadInProgress = TRUE; @@ -633,7 +630,6 @@ * @details * Inputs : none * Outputs : sensor values updated - * @param none * @return next FPGA state *************************************************************************/ static FPGA_STATE_T handleFPGAReceiveAllSensorsState( void ) @@ -691,7 +687,6 @@ * @details * Inputs : fpgaHeader * Outputs : none - * @param none * @return passed, or failed *************************************************************************/ SELF_TEST_STATUS_T execFPGATest( void ) @@ -723,7 +718,7 @@ * @details * Inputs : none * Outputs : # of bytes for next FPGA write command is set - * @param bytes2Transmit : # of bytes to be transmitted via DMA to the FPGA. + * @param bytes2Transmit number of bytes to be transmitted via DMA to the FPGA. * @return none *************************************************************************/ static void setupDMAForWriteCmd( U32 bytes2Transmit ) @@ -735,7 +730,7 @@ } else { - SET_ALARM_WITH_2_U32_DATA( ALARM_ID_SOFTWARE_FAULT, SW_FAULT_ID_FPGA_WRITE_CMD_TOO_MUCH_DATA, bytes2Transmit ) + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, SW_FAULT_ID_FPGA_WRITE_CMD_TOO_MUCH_DATA, bytes2Transmit ) } } @@ -746,7 +741,6 @@ * @details * Inputs : none * Outputs : DMA write command to FPGA is initiated - * @param none * @return none *************************************************************************/ static void startDMAWriteCmd( void ) @@ -763,7 +757,7 @@ * @details * Inputs : none * Outputs : # of expected bytes for next FPGA write command response is set - * @param bytes2Receive : # of bytes expected to be transmitted via DMA from the FPGA. + * @param bytes2Receive number of bytes expected to be transmitted via DMA from the FPGA. * @return none *************************************************************************/ static void setupDMAForWriteResp( U32 bytes2Receive ) @@ -775,7 +769,7 @@ } else { - SET_ALARM_WITH_2_U32_DATA( ALARM_ID_SOFTWARE_FAULT, SW_FAULT_ID_FPGA_WRITE_RSP_TOO_MUCH_DATA, bytes2Receive ) + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, SW_FAULT_ID_FPGA_WRITE_RSP_TOO_MUCH_DATA, bytes2Receive ) } } @@ -786,7 +780,6 @@ * @details * Inputs : none * Outputs : DMA write command response is ready to be received from the FPGA - * @param none * @return none *************************************************************************/ static void startDMAReceiptOfWriteResp( void ) @@ -803,7 +796,7 @@ * @details * Inputs : none * Outputs : # of bytes for next FPGA read command is set - * @param bytes2Transmit : # of bytes to be transmitted via DMA to the FPGA. + * @param bytes2Transmit number of bytes to be transmitted via DMA to the FPGA. * @return none *************************************************************************/ static void setupDMAForReadCmd( U32 bytes2Transmit ) @@ -815,7 +808,7 @@ } else { - SET_ALARM_WITH_2_U32_DATA( ALARM_ID_SOFTWARE_FAULT, SW_FAULT_ID_FPGA_READ_CMD_TOO_MUCH_DATA, bytes2Transmit ) + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, SW_FAULT_ID_FPGA_READ_CMD_TOO_MUCH_DATA, bytes2Transmit ) } } @@ -826,7 +819,6 @@ * @details * Inputs : none * Outputs : DMA read command to FPGA is initiated - * @param none * @return none *************************************************************************/ static void startDMAReadCmd( void ) @@ -843,7 +835,7 @@ * @details * Inputs : none * Outputs : # of expected bytes for next FPGA read command response is set - * @param bytes2Receive : # of expected bytes to be transmitted via DMA from the FPGA. + * @param bytes2Receive number of expected bytes to be transmitted via DMA from the FPGA. * @return none *************************************************************************/ static void setupDMAForReadResp( U32 bytes2Receive ) @@ -855,7 +847,7 @@ } else { - SET_ALARM_WITH_2_U32_DATA( ALARM_ID_SOFTWARE_FAULT, SW_FAULT_ID_FPGA_READ_RSP_TOO_MUCH_DATA, bytes2Receive ) + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, SW_FAULT_ID_FPGA_READ_RSP_TOO_MUCH_DATA, bytes2Receive ) } } @@ -866,7 +858,6 @@ * @details * Inputs : none * Outputs : DMA read command response is ready to be received from the FPGA - * @param none * @return none *************************************************************************/ static void startDMAReceiptOfReadResp( void ) @@ -883,7 +874,6 @@ * @details * Inputs : fpgaHeader * Outputs : none - * @param none * @return fpgaDiag *************************************************************************/ static void consumeUnexpectedData( void ) @@ -918,7 +908,7 @@ * @details * Inputs : none * Outputs : fpgaActuatorSetPoints.fpgaValveStates - * @param valveStates + * @param valveStates bit mask for the various valve states * @return none *************************************************************************/ void setFPGAValveStates( U16 valveStates ) @@ -933,7 +923,7 @@ * @details * Inputs : none * Outputs : fpgaActuatorSetPoints.fpgaDrainPumpSetSpeed - * @param drainPumpDAC + * @param drainPumpDAC DAC value to command for the drain pump * @return none *************************************************************************/ void setFPGADrainPumpSpeed( U08 drainPumpDAC ) @@ -951,7 +941,6 @@ * @details * Inputs : fpgaHeader * Outputs : none - * @param none * @return Id *************************************************************************/ U08 getFPGAId( void ) @@ -966,36 +955,35 @@ * @details * Inputs : fpgaHeader * Outputs : none - * @param none * @return Revision *************************************************************************/ U08 getFPGARev( void ) { return fpgaHeader.fpgaRev; } +/*********************************************************************//** + * @brief + * The getFPGAVersions function gets the FPGA version numbers. + * @details + * Inputs : fpgaHeader + * Outputs : none + * @return none + *************************************************************************/ +void getFPGAVersions( U08 *Id, U08 *Maj, U08 *Min, U08 *Lab ) +{ + *Id = fpgaHeader.fpgaId; + *Maj = fpgaHeader.fpgaRev; + *Min = fpgaHeader.fpgaRevMajor; + *Lab = fpgaHeader.fpgaRevLab; +} + /*********************************************************************//** * @brief - * The getFPGAStatus function gets the version read from the diagnostic register \n - * of the FPGA. - * @details - * Inputs : fpgaHeader - * Outputs : none - * @param none - * @return fpgaHeader.fpgaStatus - *************************************************************************/ -U16 getFPGAStatus( void ) -{ - return 0;//fpgaSensorReadings.fpgaStatus; -} - -/*********************************************************************//** - * @brief * The getFPGALoadCellA1 function gets the latest load cell A 1 reading. * @details * Inputs : fpgaSensorReadings * Outputs : none - * @param none * @return last load cell A 1 reading *************************************************************************/ U32 getFPGALoadCellA1( void ) @@ -1009,7 +997,6 @@ * @details * Inputs : fpgaSensorReadings * Outputs : none - * @param none * @return last load cell A 2 reading *************************************************************************/ U32 getFPGALoadCellA2( void ) @@ -1023,7 +1010,6 @@ * @details * Inputs : fpgaSensorReadings * Outputs : none - * @param none * @return last load cell B 1 reading *************************************************************************/ U32 getFPGALoadCellB1( void ) @@ -1037,7 +1023,6 @@ * @details * Inputs : fpgaSensorReadings * Outputs : none - * @param none * @return last load cell B 2 reading *************************************************************************/ U32 getFPGALoadCellB2( void ) @@ -1052,7 +1037,6 @@ * @details * Inputs : fpgaSensorReadings.fpgaValveStates * Outputs : none - * @param none * @return last valve states reading *************************************************************************/ U16 getFPGAValveStates( void ) @@ -1066,7 +1050,6 @@ * @details * Inputs : fpgaSensorReadings.fpgaROFlowRate * Outputs : none - * @param none * @return last RO flow rate reading *************************************************************************/ U16 getFPGAROPumpFlowRate( void ) @@ -1080,7 +1063,6 @@ * @details * Inputs : fpgaSensorReadings.fpgaDrainPumpSpeed * Outputs : none - * @param none * @return last drain pump speed reading *************************************************************************/ U16 getFPGADrainPumpSpeed( void ) @@ -1095,7 +1077,6 @@ * @details * Inputs : fpgaSensorReadings.fpgaTPiTemp * Outputs : none - * @param none * @return last primary heater inlet temperature reading *************************************************************************/ U32 getFPGATPiTemp( void ) @@ -1110,7 +1091,6 @@ * @details * Inputs : fpgaSensorReadings.fpgaTPoTemp * Outputs : none - * @param none * @return last primary heater outlet temperature reading *************************************************************************/ U32 getFPGATPoTemp( void ) @@ -1125,7 +1105,6 @@ * @details * Inputs : fpgaSensorReadings.fpgaCD1Temp * Outputs : none - * @param none * @return last conductivity sensor 1 outlet temperature reading *************************************************************************/ U32 getFPGACD1Temp( void ) @@ -1140,7 +1119,6 @@ * @details * Inputs : fpgaSensorReadings.fpgaCD2Temp * Outputs : none - * @param none * @return last conductivity sensor 2 outlet temperature reading *************************************************************************/ U32 getFPGACD2Temp( void ) @@ -1155,7 +1133,6 @@ * @details * Inputs : fpgaSensorReadings.fpgaRTDErrorCnt * Outputs : none - * @param none * @return Last error count of the RTD conductivity sensors *************************************************************************/ U08 getFPGARTDErrorCount( void ) @@ -1170,7 +1147,6 @@ * @details * Inputs : fpgaSensorReadings.fpgaRTDReadCnt * Outputs : none - * @param none * @return Last read count of the RTC conductivity sensors *************************************************************************/ U08 getFPGARTDReadCount( void ) @@ -1185,7 +1161,6 @@ * @details * Inputs : fpgaSensorReadings.fpgaTHDoTemp * Outputs : none - * @param none * @return Last redundant sensor outlet temperature reading *************************************************************************/ U32 getFPGATHDoTemp( void ) @@ -1200,7 +1175,6 @@ * @details * Inputs : fpgaSensorReadings.fpgaTHDoErrorCnt * Outputs : none - * @param none * @return Last redundant sensor outlet temperature error count *************************************************************************/ U08 getFPGATHDoErrorCount( void ) @@ -1214,7 +1188,6 @@ * @details * Inputs : fpgaSensorReadings.fpgaTHDoReadCnt * Outputs : none - * @param none * @return Last redundant sensor outlet temperature error count reading *************************************************************************/ U08 getFPGATHDoReadCount( void ) @@ -1229,7 +1202,6 @@ * @details * Inputs : fpgaSensorReadings.fpgaTDiTemp * Outputs : none - * @param none * @return last primary heater outlet temperature reading *************************************************************************/ U32 getFPGATDiTemp( void ) @@ -1244,7 +1216,6 @@ * @details * Inputs : fpgaSensorReadings.fpgaTDiErrorCnt * Outputs : none - * @param none * @return Last dialysate inlet error count *************************************************************************/ U08 getFPGATDiErrorCount( void ) @@ -1259,7 +1230,6 @@ * @details * Inputs : fpgaSensorReadings.fpgaTDiReadCnt * Outputs : none - * @param none * @return Last dialysate inlet read count *************************************************************************/ U08 getFPGATDiReadCount( void ) @@ -1274,7 +1244,6 @@ * @details * Inputs : fpgaSensorReadings.fpgaPrimaryHeaterIntTemp * Outputs : none - * @param none * @return last primary heater temperature reading *************************************************************************/ U16 getFPGAPrimaryHeaterTemp( void ) @@ -1289,7 +1258,6 @@ * @details * Inputs : fpgaSensorReadings.fpgaPrimaryHeaterFlags * Outputs : none - * @param none * @return Last primary heater internal temperature sensor flag read *************************************************************************/ U08 getFPGAPrimaryHeaterFlags( void ) @@ -1304,7 +1272,6 @@ * @details * Inputs : fpgaSensorReadings.fpgaPrimaryHeaterReadCnt * Outputs : none - * @param none * @return Last primary heater internal temperature sensor read count *************************************************************************/ U08 getFPGAPrimaryHeaterReadCount( void ) @@ -1319,7 +1286,6 @@ * @details * Inputs : fpgaSensorReadings.fpgaTrimmerHeaterIntTemp * Outputs : none - * @param none * @return last trimmer heater temperature reading *************************************************************************/ U16 getFPGATrimmerHeaterTemp( void ) @@ -1334,7 +1300,6 @@ * @details * Inputs : fpgaSensorReadings.fpgaTrimmerHeaterFlags * Outputs : none - * @param none * @return Last trimmer heater internal temperature flags read *************************************************************************/ U08 getFPGATrimmerHeaterFlags( void ) @@ -1349,7 +1314,6 @@ * @details * Inputs : fpgaSensorReadings.fpgaTrimmerHeaterReadCnt * Outputs : none - * @param none * @return Last trimmer heater internal temperature read count *************************************************************************/ U08 getFPGATrimmerHeaterReadCount( void ) @@ -1364,7 +1328,6 @@ * @details * Inputs : fpgaSensorReadings.fpgaPrimaryHeaterIntJunctionTemp * Outputs : none - * @param none * @return Last primary cold junction temperature *************************************************************************/ U16 getFPGAPRimaryColdJunctionTemp ( void ) @@ -1379,10 +1342,153 @@ * @details * Inputs : fpgaSensorReadings.fpgaTrimmerHeaterIntJunctionTemp * Outputs : none - * @param none * @return Last trimmer cold junction temperature *************************************************************************/ U16 getFPGATrimmerColdJunctionTemp ( void ) { return fpgaSensorReadings.fpgaTrimmerHeaterIntJunctionTemp; } + +/*********************************************************************//** + * @brief + * The getFPGAAccelAxes function gets the accelerometer axis readings. \n + * Axis readings are in ADC counts. 0.004 g per LSB. + * @details + * Inputs : fpgaSensorReadings + * Outputs : none + * @param x Populate this param with X axis reading + * @param y Populate this param with Y axis reading + * @param z Populate this param with Z axis reading + * @return none + *************************************************************************/ +void getFPGAAccelAxes( S16 *x, S16 *y, S16 *z ) +{ + *x = (S16)fpgaSensorReadings.accelX; + *y = (S16)fpgaSensorReadings.accelY; + *z = (S16)fpgaSensorReadings.accelZ; +} + +/*********************************************************************//** + * @brief + * The getFPGAAccelMaxes function gets the maximum accelerometer axis readings. \n + * from last FPGA read (every 10ms). \n + * Axis readings are in ADC counts. 0.004 g per LSB. + * @details + * Inputs : fpgaSensorReadings + * Outputs : none + * @param x Populate this param with maximum X axis reading + * @param y Populate this param with maximum Y axis reading + * @param z Populate this param with maximum Z axis reading + * @return none + *************************************************************************/ +void getFPGAAccelMaxes( S16 *xmax, S16*ymax, S16*zmax ) +{ + *xmax = (S16)fpgaSensorReadings.accelXMax; + *ymax = (S16)fpgaSensorReadings.accelYMax; + *zmax = (S16)fpgaSensorReadings.accelZMax; +} + +/*********************************************************************//** + * @brief + * The getFPGAAccelStatus function gets the accelerometer reading count \n + * and error register values. + * @details + * Inputs : fpgaSensorReadings + * Outputs : none + * @param cnt Populate this param with latest sample counter value + * @param err Populate this param with latest error + * @return none + *************************************************************************/ +void getFPGAAccelStatus( U16 *cnt, U16 *err ) +{ + *cnt = fpgaSensorReadings.accelSampleCounter; + *err = fpgaSensorReadings.accelFaultRegister; +} + +/************************************************************************* + * @brief + * The getFPGACPiReadCount function gets inlet water conductivity sensor + * read count + * @details + * Inputs : fpgaSensorReadings.fpgaCPiReadCnt + * Outputs : none + * @param none + * @return Last inlet water conductivity sensor read count + *************************************************************************/ +U08 getFPGACPiReadCount ( void ) +{ + return fpgaSensorReadings.fpgaCPiReadCnt; +} + +/************************************************************************* + * @brief + * The getFPGACPiErrorCount function gets inlet water conductivity sensor + * error count + * @details + * Inputs : fpgaSensorReadings.fpgaCPiErrorCnt + * Outputs : none + * @param none + * @return Inlet water conductivity sensor read error count + *************************************************************************/ +U08 getFPGACPiErrorCount ( void ) +{ + return fpgaSensorReadings.fpgaCPiErrorCnt; +} + +/************************************************************************* + * @brief + * The getFPGACPi function gets inlet water conductivity value + * @details + * Inputs : fpgaSensorReadings.fpgaCPi + * Outputs : none + * @param none + * @return Last inlet water conductivity value + *************************************************************************/ +U32 getFPGACPi ( void ) +{ + return fpgaSensorReadings.fpgaCPi; +} + +/************************************************************************* + * @brief + * The getFPGACPoReadCount function gets outlet water conductivity sensor + * read count + * @details + * Inputs : fpgaSensorReadings.fpgaCPoReadCnt + * Outputs : none + * @param none + * @return Last outlet water conductivity sensor read count + *************************************************************************/ +U08 getFPGACPoReadCount ( void ) +{ + return fpgaSensorReadings.fpgaCPoReadCnt; +} + +/************************************************************************* + * @brief + * The getFPGACPoErrorCount function gets outlet water conductivity sensor + * error count + * @details + * Inputs : fpgaSensorReadings.fpgaCPoErrorCnt + * Outputs : none + * @param none + * @return Outlet water conductivity sensor read error count + *************************************************************************/ +U08 getFPGACPoErrorCount ( void ) +{ + return fpgaSensorReadings.fpgaCPoErrorCnt; +} + +/************************************************************************* + * @brief + * The getFPGACPo function gets outlet water conductivity value + * @details + * Inputs : fpgaSensorReadings.fpgaCPo + * Outputs : none + * @param none + * @return Last Outlet water conductivity value + *************************************************************************/ +U32 getFPGACPo ( void ) +{ + return fpgaSensorReadings.fpgaCPo; +}