/************************************************************************** * * Copyright (c) 2019-2024 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * @file FPGA.c * * @author (last) Sean Nash * @date (last) 09-Nov-2024 * * @author (original) Sean Nash * @date (original) 09-Nov-2024 * ***************************************************************************/ #include "string.h" // for memset(), memcpy() #include "Compatible.h" #include "FpgaRO.h" #include "OperationModes.h" #include "Timers.h" #include "Utilities.h" /** * @addtogroup FpgaRO * @{ */ // ********** private definitions ********** #define FPGA_EXPECTED_ID 0x01 ///< Expected ID for TD FPGA. #define PROCESSOR_FPGA_CLOCK_DIFF_TOLERANCE 1 ///< Tolerance for processor clock speed check against FPGA clock. #define MAX_FPGA_COMM_FAILURES_WINDOW_MS ( 1 * SEC_PER_MIN * MS_PER_SECOND ) ///< FPGA comm failures window #define MAX_FPGA_COMM_FAILURES 3 ///< FPGA maximum comm failures per MAX_FPGA_COMM_FAILURES_WINDOW_MS #define MIN_POWER_ON_TIME_FOR_COMM_FAILS ( 1 * MS_PER_SECOND ) ///< Allow FPGA comm errors for first second after power-up #define HEATER_ENABLED 0x01 ///< Heater enable bit. #define HEATER_DISABLED 0x00 ///< Heater disabled. #define FPGA_CONDUCTIVITY_RESET_BIT 0x01 ///< Conductivity Sensor reset bit mask. #define FPGA_CONDUCTIVITY_INIT_ENABLE_BIT 0x02 ///< Conductivity Sensor initialization enable bit mask. #define FPGA_CONDUCTIVITY_WR_ENABLE_BIT 0x04 ///< Conductivity Sensor write enable bit mask. #define FPGA_CONDUCTIVITY_RD_ENABLE_BIT 0x08 ///< Conductivity Sensor read enable bit mask. // FPGA Sensors Record #pragma pack(push,1) /// Record structure for FPGA header read. 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 (minor) being reported. U08 fpgaRevMajor; ///< Reg 2. FPGA revision (major) being reported. U08 fpgaRevLab; ///< Reg 3. FPGA revision (lab) being reported. } FPGA_HEADER_T; // Read only on FPGA /// Record structure for FPGA continuous priority reads. typedef struct { U16 compatibilityRev; ///< Reg 256. FPGA compatibility revision. U16 counterTimer1ms; ///< Reg 258. FPGA 1ms timer counter. U16 fpgaGenWrRd; ///< Reg 260. FPGA general read-back register (mirrored from a general write register in write page at addr 4). U08 errorCountProcessor; ///< Reg 262. Error count for processor communications. U08 errorCountPC; ///< Reg 263. Error count for TBD. S16 pressureM1; ///< Reg 264. M1 pressure data. U16 temperatureM1; ///< Reg 266. M1 temperature data. U08 readCountM1; ///< Reg 268. M1 read counter. U08 reserved1a; ///< Reg 269. M1 error counter. S16 pressureM3; ///< Reg 270. M3 pressure data. U16 temperatureM3; ///< Reg 272. M3 temperature data. U08 readCountM3; ///< Reg 274. M3 read counter. U08 reserved1b; ///< Reg 275. M3 error counter. S16 pressureP8; ///< Reg 276. P8 pressure data. U16 temperatureP8; ///< Reg 278. P8 temperature data. U08 readCountP8; ///< Reg 280. P8 read counter. U08 reserved1c; ///< Reg 281. P8 error counter. S16 pressureP13; ///< Reg 282. P13 pressure data. U16 temperatureP13; ///< Reg 284. P13 temperature data. U08 readCountP13; ///< Reg 286. P13 read counter. U08 reserved1d; ///< Reg 287. P13 error counter. S16 pressureP17; ///< Reg 288. P17 pressure data. U16 temperatureP17; ///< Reg 290. P17 temperature data. U08 readCountP17; ///< Reg 292. P17 read counter. U08 reserved1e; ///< Reg 293. P17 error counter. S16 pressureX1; ///< Reg 294. X1 pressure data. U16 temperatureX1; ///< Reg 296. X1 temperature data. U08 readCountX1; ///< Reg 298. X1 read counter. U08 reserved1f; ///< Reg 299. X1 error counter. S16 pressureX2; ///< Reg 300. X2 pressure data. U16 temperatureX2; ///< Reg 302. X2 temperature data. U08 readCountX2; ///< Reg 304. X2 read counter. U08 reserved1g; ///< Reg 305. X2 error counter. S16 pressureX3; ///< Reg 306. X3 pressure data. U16 temperatureX3; ///< Reg 308. X3 temperature data. U08 readCountX3; ///< Reg 310. X3 read counter. U08 reserved1h; ///< Reg 311. X3 error counter. S16 pressureX4; ///< Reg 312. X4 pressure data. U16 temperatureX4; ///< Reg 314. X4 temperature data. U08 readCountX4; ///< Reg 316. X4 read counter. U08 reserved1i; ///< Reg 317. X4 error counter. S16 pressureX5; ///< Reg 318. X5 pressure data. U16 temperatureX5; ///< Reg 320. X5 temperature data. U08 readCountX5; ///< Reg 322. X5 read counter. U08 reserved1j; ///< Reg 323. X5 error counter. U16 p40PumpTachCount; ///< Reg 324. P40 pump tachometer counter. U16 reserved2; ///< Reg 326. Reserved. U08 p25LevelSwitch; ///< Reg 328. P25 level switch. U08 reserved3; ///< Reg 329. Reserved. U16 reserved4; ///< Reg 330. Reserved. U16 reserved5; ///< Reg 332. Reserved. U08 reserved6; ///< Reg 334. Reserved. U08 reserved7; ///< Reg 335. Reserved. U32 conductivityP9Data; ///< Reg 336. P9 conductivity sensor data. U16 conductivityP9Cond; ///< Reg 340. P9 conductivity sensor conductivity. U16 conductivityP9Temp; ///< Reg 342. P9 conductivity sensor temperature. U08 conductivityP9ReadCount; ///< Reg 344. P9 conductivity sensor read counter. U08 conductivityP9ErrorCount; ///< Reg 345. P9 conductivity sensor error counter. U32 conductivityP18Data; ///< Reg 346. P18 conductivity sensor data. U16 conductivityP18Cond; ///< Reg 350. P18 conductivity sensor conductivity. U16 conductivityP18Temp; ///< Reg 352. P18 conductivity sensor temperature. U08 conductivityP18ReadCount; ///< Reg 354. P18 conductivity sensor read counter. U08 conductivityP18ErrorCount; ///< Reg 355. P18 conductivity sensor error counter. U16 flowRateP7; ///< Reg 356. P7 flow sensor rate. U16 flowTempP7; ///< Reg 358. P7 flow sensor temperature. U16 p12PumpTachCount; ///< Reg 360. P12 pump tachometer counter. U16 dsPumpTachCount; ///< Reg 362. DSP tachometer counter. U16 flowIntTempP7; ///< Reg 364. P7 flow sensor internal temperature. U16 valveControlReadback; ///< Reg 366. Valve control bits read back. U16 p12PumpPWMReadback; ///< Reg 368. P12 pump PWM read back. U16 p40PumpPWMReadback; ///< Reg 370. P40 pump PWM read back. U08 p7flowReadCount; ///< Reg 372. P7 Flow sensor read counter. U08 p7flowErrorCount; ///< Reg 373. P7 Flow sensor error counter. U16 valvePWMEnableReadback; ///< Reg 374. Valve PWM enable read back. U32 tempP23; ///< Reg 376. P23 temperature sensor reading. U32 tempP22; ///< Reg 380. P22 ( TRO2 ) temperature sensor reading. U32 tempTax1; ///< Reg 384. ( Tax1 ) temperature sensor reading. U32 tempRTD; ///< Reg 388. spare temperature sensor reading. U08 ad7124errcnt; ///< Reg 392. Counter which increments when an invalid transaction happen between FPGA and AD7124. U08 ad7124readcnt; ///< Reg 393. Counter which increments when a valid transaction happens between FPGA and AD7124. U16 flowRateP16; ///< Reg 394. P16 flow sensor rate. U16 flowTempP16; ///< Reg 396. P16 flow sensor temperature. U16 flowIntTempP16; ///< Reg 398. P16 flow sensor internal temperature. U08 p16flowReadCount; ///< Reg 400. P16 Flow sensor read counter. U08 p16flowErrorCount; ///< Reg 401. P16 Flow sensor error counter. } FPGA_SENSORS_T; /// Record structure for FPGA continuous priority writes. typedef struct { U16 valveControl; ///< Reg 04. Valve control register. U08 conductivityP9Control; ///< Reg 06. P9 conductivity control register. U08 conductivityP18Control; ///< Reg 07. P18 conductivity control register. U16 conductivityP9Address; ///< Reg 08. P9 conductivity address register. U32 conductivityP9Data; ///< Reg 10. P9 conductivity data in register. U16 conductivityP18Address; ///< Reg 14. P18 conductivity address register. U32 conductivityP18Data; ///< Reg 16. P18 conductivity data in register. U16 fpgaGenWrRd; ///< Reg 20. FPGA general write/read-back register (mirrored to a general read register in read page at addr 256). U16 descalePumpSpeed; ///< Reg 22. Descaler pump speed register. U08 descalePumpControl; ///< Reg 24. Descaler pump control register. U08 p12PumpControl; ///< Reg 25. P12 pump control register. U16 valveVwiPWMLow; ///< Reg 26. Valve VWi PWM low pulse period in 0.1 uSec. U16 valveVwiPWMPeriod; ///< Reg 28. Valve VWi PWM full period in 0.1 uSec. U16 valvePWMPullIn; ///< Reg 30. Valve PWM high pulse period when valve is on in 0.1 uSec. U16 p12PumpPWMDutyCyclePct; ///< Reg 32. P12 pump PWM duty cycle in percentage. U16 p40PumpPWMDutyCyclePct; ///< Reg 34. P40 pump PWM duty cycle in percentage. U08 p40PumpControl; ///< Reg 36. P40 pump control register. U08 reserved1; ///< Reg 37. Reserved. U08 flowControlp7; ///< Reg 38. P7 AVS Romer flow sensor control register. U08 flowAddressp7; ///< Reg 39. P7 AVS Romer flow sensor I2C slave address register. U16 valvePWMEnable; ///< Reg 40. Valve PWM enable register. U08 flowControlp16; ///< Reg 42. P16 AVS Romer flow sensor control register. U08 flowAddressp16; ///< Reg 43. P16 AVS Romer flow sensor I2C slave address register. } FPGA_ACTUATORS_T; #pragma pack(pop) // ********** private data ********** // FPGA data static FPGA_HEADER_T fpgaHeader; ///< Record of last received FPGA header data. static FPGA_SENSORS_T fpgaSensorReadings; ///< Record of last received FPGA priority sensor data. static FPGA_ACTUATORS_T fpgaActuatorSetPoints; ///< Record of next transmitted FPGA priority actuator data. // FPGA Clock Speed Test static U16 currentFPGATimerCount_ms = 0; ///< Last read ms timer count from FPGA. static U32 currentTimerCount_ms = 0; ///< Last read ms timer count from processor. /*********************************************************************//** * @brief * The initFPGARO function initializes the RO FPGA unit. * @details \b Inputs: none * @details \b Outputs: RO FPGA unit initialized. * @return none *************************************************************************/ void initFPGARO( void ) { // Initialize fpga driver initFPGA( (U08*)&fpgaHeader, (U08*)&fpgaSensorReadings, (U08*)&fpgaActuatorSetPoints, sizeof(FPGA_HEADER_T), sizeof(FPGA_SENSORS_T), sizeof(FPGA_ACTUATORS_T) ); // Initialize fpga data structures memset( &fpgaHeader, 0, sizeof(FPGA_HEADER_T) ); memset( &fpgaSensorReadings, 0, sizeof(FPGA_SENSORS_T) ); memset( &fpgaActuatorSetPoints, 0, sizeof(FPGA_ACTUATORS_T) ); // initialize FPGA clock speed error time windowed count initTimeWindowedCount( TIME_WINDOWED_COUNT_FPGA_COMM_FAILURES, MAX_FPGA_COMM_FAILURES, MAX_FPGA_COMM_FAILURES_WINDOW_MS); } /*********************************************************************//** * @brief * The execFPGATest function executes the FPGA self-test. * @details \b Alarm: ALARM_ID_RO_FPGA_POST_TEST_FAILED if self-test fails. * @details \b Inputs: fpgaHeader * @details \b Outputs: none * @return passed or failed *************************************************************************/ SELF_TEST_STATUS_T execFPGATest( void ) { SELF_TEST_STATUS_T result; // check FPGA reported correct ID if ( FPGA_EXPECTED_ID == fpgaHeader.fpgaId ) { // Check FPGA compatibility w/ firmware if ( RO_FPGA_COMPATIBILITY_REV == fpgaSensorReadings.compatibilityRev ) { result = SELF_TEST_STATUS_PASSED; } else { result = SELF_TEST_STATUS_FAILED; // TODO uncomment // SET_ALARM_WITH_2_U32_DATA( ALARM_ID_RO_FPGA_POST_TEST_FAILED, (U32)TD_FPGA_COMPATIBILITY_REV, (U32)fpgaSensorReadings.fpgaCompatibilityRev ) } } else { result = SELF_TEST_STATUS_FAILED; // TODO uncomment // SET_ALARM_WITH_1_U32_DATA( ALARM_ID_RO_FPGA_POST_TEST_FAILED, (U32)fpgaHeader.fpgaId ) } return result; } /*********************************************************************//** * @brief * The getFPGATimerCount function gets the latest FPGA timer millisecond count. * @details \b Inputs: fpgaSensorReadings * @details \b Outputs: none * @return last FPGA millisecond timer count *************************************************************************/ U16 getFPGATimerCount( void ) { return fpgaSensorReadings.counterTimer1ms; } /*********************************************************************//** * @brief * The execFPGAClockSpeedTest function verifies the processor clock speed * against the FPGA clock. * @details \b Alarm: ALARM_ID_RO_FPGA_CLOCK_SPEED_CHECK_FAILURE if test fails. * @details \b Inputs: fpgaSensorReadings.fpgaTimerCount_ms, msTimerCount, * currentFPGATimerCount_ms, currentTimerCount_ms * @details \b Outputs: currentFPGATimerCount_ms, currentTimerCount_ms * @return none *************************************************************************/ void execFPGAClockSpeedTest( void ) { // DEBUG WARNING // It may be necessary to comment out the following // code to prevent the alarm from occurring while // debugging. U16 newFPGATimerCount_ms = getFPGATimerCount(); U32 newTimerCount_ms = getMSTimerCount(); U32 diffFPGATimerCount = (U32)u16DiffWithWrap( currentFPGATimerCount_ms, newFPGATimerCount_ms ); U32 diffTimerCount = u32DiffWithWrap( currentTimerCount_ms, newTimerCount_ms ); if ( getCurrentOperationMode() != RO_MODE_INIT ) { if ( abs( diffFPGATimerCount - diffTimerCount ) > PROCESSOR_FPGA_CLOCK_DIFF_TOLERANCE ) { if ( TRUE == incTimeWindowedCount( TIME_WINDOWED_COUNT_FPGA_CLOCK_SPEED_ERROR ) ) { // TODO uncomment // SET_ALARM_WITH_2_U32_DATA( ALARM_ID_RO_FPGA_CLOCK_SPEED_CHECK_FAILURE, diffFPGATimerCount, diffTimerCount ); } } } currentFPGATimerCount_ms = newFPGATimerCount_ms; currentTimerCount_ms = newTimerCount_ms; } /*********************************************************************//** * @brief * The getFPGAVersions function gets the fpga version numbers. * @details \b Inputs: fpgaHeader * @details \b Outputs: Given version reference variables are populated. * @return none *************************************************************************/ void getFPGAVersions( U08 *Id, U08 *Maj, U08 *Min, U08 *Lab ) { *Id = fpgaHeader.fpgaId; *Min = fpgaHeader.fpgaRev; *Maj = fpgaHeader.fpgaRevMajor; *Lab = fpgaHeader.fpgaRevLab; } /*********************************************************************//** * @brief * The checkFPGACommFailure function increments the FPGA comm failure * windowed timer and returns whether or not the number of failures in * the window have been reached. * @details \b Inputs: none * @details \b Outputs: none * @return TRUE if windowed count exceeded, else false. *************************************************************************/ void checkFPGACommFailure( void ) { if ( getMSTimerCount() > MIN_POWER_ON_TIME_FOR_COMM_FAILS ) { if ( TRUE == incTimeWindowedCount( TIME_WINDOWED_COUNT_FPGA_COMM_FAILURES ) ) { // TODO uncomment // SET_ALARM_WITH_2_U32_DATA( ALARM_ID_RO_FPGA_COMM_TIMEOUT, MAX_FPGA_COMM_FAILURES, (U32)fpgaSensorReadings.errorCountProcessor ) } } } /*********************************************************************//** * @brief * The checkFPGAAFEOEFailure function increments the FPGA comm failure * windowed timer if an FE or OE error has occurred and returns whether * or not the number of failures in * the window have been reached. * @details \b Inputs: none * @details \b Outputs: none * @details \b Alarm: ALARM_ID_DD_FPGA_COMM_TIMEOUT when FPGA communication is * lost with the processor. * @return TRUE if windowed count exceeded, else false. *************************************************************************/ BOOL checkFPGAFEOEFailure( void ) { BOOL status = FALSE; BOOL FPGAFEOEError = getSci2FEOEError(); if ( TRUE == FPGAFEOEError) { if ( getMSTimerCount() > MIN_POWER_ON_TIME_FOR_COMM_FAILS ) { if ( TRUE == incTimeWindowedCount( TIME_WINDOWED_COUNT_FPGA_COMM_FAILURES ) ) { // TODO uncomment //SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_FPGA_COMM_TIMEOUT, MAX_FPGA_COMM_FAILURES, (U32)fpgaSensorReadings.fpgaIOErrorCntProcessor ) status = TRUE; } } } return status; } /*********************************************************************//** * @brief * The setFPGAValveStates function sets the RO valve states with an 8-bit * mask of states - one bit per valve, with a 1 meaning "energized" and a 0 * meaning "de-energized". The bit positions for these bit states are as follows: * 0 - VWi.\n * 1 - VFb.\n * 2 - VFf.\n * 3 - VPi.\n * 4 - VCr.\n * 5 - VCb.\n * 6 - VCd.\n * 7 - VROd.\n * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.valveControl * @param valveStates bit mask for requested valve states * @return none *************************************************************************/ void setFPGAValveStates( U16 valveStates ) { fpgaActuatorSetPoints.valveControl = valveStates; } /*********************************************************************//** * @brief * The getFPGAValveStates function gets the RO valve commanded states with * an 8-bit mask representing the set of states with a 1 meaning "energized" * and a 0 meaning "de-energized". * @details \b Inputs: none * @details \b Outputs: fpgaSensorReadings.valveControlReadback * @return none *************************************************************************/ U16 getFPGAValveStates( void ) { return fpgaSensorReadings.valveControlReadback; } /*********************************************************************//** * @brief * The setFPGAP12PumpEnable function enables or disables the P12 pump. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.p12PumpControl * @param enable flag indicating whether to enable or disable the P12 pump. * @return none *************************************************************************/ void setFPGAP12PumpEnable( BOOL enable ) { fpgaActuatorSetPoints.p12PumpControl = ( TRUE == enable ? 0x1 : 0x0 ); } /*********************************************************************//** * @brief * The setFPGAP12PumpPWM function sets the P12 pump PWM duty cycle. * The higher the PWM duty cycle (0..500), the faster the pump will go. * @note PWM values < 5% or > 95% will cause pump to stop so effective * range is actually 25..475. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.p12PumpPWMDutyCyclePct * @param pwm PWM duty cycle magnitude * @return none *************************************************************************/ void setFPGAP12PumpPWM( U16 pwm ) { fpgaActuatorSetPoints.p12PumpPWMDutyCyclePct = pwm; } /*********************************************************************//** * @brief * The getFPGAP12PumpPWM function gets a read back from FPGA of RO pump PWM * duty cycle. * @details \b Inputs: fpgaSensorReadings.roPumpPWMReadback * @details \b Outputs: none * @return measured speed (RPM) of the RO pump *************************************************************************/ U16 getFPGAP12PumpPWM( void ) { return fpgaSensorReadings.p12PumpPWMReadback; } /*********************************************************************//** * @brief * The getFPGAP12PumpTachCount function gets the running 16-bit tachometer count * from the P12 pump hall sensor. * @details \b Inputs: fpgaSensorReadings.p12PumpTachCount * @details \b Outputs: none * @return P12 pump tachometer count *************************************************************************/ U16 getFPGAP12PumpTachCount( void ) { return fpgaSensorReadings.p12PumpTachCount; } /*********************************************************************//** * @brief * The setFPGAP24Enabled function sets the heater enable on or off. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.p24Control * @param enable Flag indicating whether to enable or disable the P24 heater. * @return none *************************************************************************/ void setFPGAP24Enabled( BOOL enable ) { return; } /*********************************************************************//** * @brief * The setFPGAP24PWM function sets the P24 heater PWM duty cycle. * The higher the PWM duty cycle (0..500), the faster the pump will go. * @note PWM values < 5% or > 95% will cause heater to go off so effective * range is actually 25..475. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.p24PWMDutyCyclePct * @param pwm PWM duty cycle magnitude * @return none *************************************************************************/ void setFPGAP24PWM( U16 pwm ) { return; } /*********************************************************************//** * @brief * The getFPGAM1RawPressure function gets the M1 pressure reading. * @details \b Inputs: fpgaSensorReadings.pressureM1 * @details \b Outputs: none * @return M1 pressure *************************************************************************/ S16 getFPGAM1RawPressure( void ) { return fpgaSensorReadings.pressureM1; } /*********************************************************************//** * @brief * The getFPGAM1RawTemperature function gets the M1 sensor temperature reading. * @details \b Inputs: fpgaSensorReadings.temperatureM1 * @details \b Outputs: none * @return M1 sensor temperature *************************************************************************/ S16 getFPGAM1RawTemperature( void ) { return fpgaSensorReadings.temperatureM1; } /*********************************************************************//** * @brief * The getFPGAM1ReadCount function gets the M1 sensor read count. * @details \b Inputs: fpgaSensorReadings.readCountM1 * @details \b Outputs: none * @return M1 sensor read count *************************************************************************/ U08 getFPGAM1ReadCount( void ) { return fpgaSensorReadings.readCountM1; } /*********************************************************************//** * @brief * The getFPGAM3RawPressure function gets the M3 pressure reading. * @details \b Inputs: fpgaSensorReadings.pressureM3 * @details \b Outputs: none * @return M3 pressure *************************************************************************/ S16 getFPGAM3RawPressure( void ) { return fpgaSensorReadings.pressureM3; } /*********************************************************************//** * @brief * The getFPGAM3RawTemperature function gets the M3 sensor temperature. * @details \b Inputs: fpgaSensorReadings.temperatureM3 * @details \b Outputs: none * @return M3 sensor temperature *************************************************************************/ S16 getFPGAM3RawTemperature( void ) { return fpgaSensorReadings.temperatureM3; } /*********************************************************************//** * @brief * The getFPGAM3ReadCount function gets the M3 sensor read count. * @details \b Inputs: fpgaSensorReadings.readCountM3 * @details \b Outputs: none * @return M3 sensor read count *************************************************************************/ U08 getFPGAM3ReadCount( void ) { return fpgaSensorReadings.readCountM3; } /*********************************************************************//** * @brief * The getFPGAP8RawPressure function gets the P8 pressure reading. * @details \b Inputs: fpgaSensorReadings.pressureP8 * @details \b Outputs: none * @return P8 pressure *************************************************************************/ S16 getFPGAP8RawPressure( void ) { return fpgaSensorReadings.pressureP8; } /*********************************************************************//** * @brief * The getFPGAP8RawTemperature function gets the P8 sensor temperature. * @details \b Inputs: fpgaSensorReadings.temperatureP8 * @details \b Outputs: none * @return P8 sensor temperature *************************************************************************/ S16 getFPGAP8RawTemperature( void ) { return fpgaSensorReadings.temperatureP8; } /*********************************************************************//** * @brief * The getFPGAP8ReadCount function gets the P8 sensor read count. * @details \b Inputs: fpgaSensorReadings.readCountP8 * @details \b Outputs: none * @return P8 sensor read count *************************************************************************/ U08 getFPGAP8ReadCount( void ) { return fpgaSensorReadings.readCountP8; } /*********************************************************************//** * @brief * The getFPGAP13RawPressure function gets the P13 pressure reading. * @details \b Inputs: fpgaSensorReadings.pressureP13 * @details \b Outputs: none * @return P13 pressure *************************************************************************/ S16 getFPGAP13RawPressure( void ) { return fpgaSensorReadings.pressureP13; } /*********************************************************************//** * @brief * The getFPGAP13RawTemperature function gets the P13 sensor temperature. * @details \b Inputs: fpgaSensorReadings.temperatureP13 * @details \b Outputs: none * @return P13 sensor temperature *************************************************************************/ S16 getFPGAP13RawTemperature( void ) { return fpgaSensorReadings.temperatureP13; } /*********************************************************************//** * @brief * The getFPGAP13ReadCount function gets the P13 sensor read count. * @details \b Inputs: fpgaSensorReadings.readCountP13 * @details \b Outputs: none * @return P13 sensor read count *************************************************************************/ U08 getFPGAP13ReadCount( void ) { return fpgaSensorReadings.readCountP13; } /*********************************************************************//** * @brief * The getFPGAP17RawPressure function gets the P17 pressure reading. * @details \b Inputs: fpgaSensorReadings.pressureP17 * @details \b Outputs: none * @return P17 pressure *************************************************************************/ S16 getFPGAP17RawPressure( void ) { return fpgaSensorReadings.pressureP17; } /*********************************************************************//** * @brief * The getFPGAP17RawTemperature function gets the P17 sensor temperature. * @details \b Inputs: fpgaSensorReadings.temperatureP17 * @details \b Outputs: none * @return P17 sensor temperature *************************************************************************/ S16 getFPGAP17RawTemperature( void ) { return fpgaSensorReadings.temperatureP17; } /*********************************************************************//** * @brief * The getFPGAP17ReadCount function gets the P17 sensor read count. * @details \b Inputs: fpgaSensorReadings.readCountP17 * @details \b Outputs: none * @return P17 sensor read count *************************************************************************/ U08 getFPGAP17ReadCount( void ) { return fpgaSensorReadings.readCountP17; } /*********************************************************************//** * @brief * The getFPGAX1RawPressure function gets the X1 pressure reading. * @details \b Inputs: fpgaSensorReadings.pressureX1 * @details \b Outputs: none * @return X1 pressure *************************************************************************/ S16 getFPGAX1RawPressure( void ) { return fpgaSensorReadings.pressureX1; } /*********************************************************************//** * @brief * The getFPGAX1RawTemperature function gets the X1 sensor temperature. * @details \b Inputs: fpgaSensorReadings.temperatureX1 * @details \b Outputs: none * @return X1 sensor temperature *************************************************************************/ S16 getFPGAX1RawTemperature( void ) { return fpgaSensorReadings.temperatureX1; } /*********************************************************************//** * @brief * The getFPGAX1ReadCount function gets the X1 sensor read count. * @details \b Inputs: fpgaSensorReadings.readCountX1 * @details \b Outputs: none * @return X1 sensor read count *************************************************************************/ U08 getFPGAX1ReadCount( void ) { return fpgaSensorReadings.readCountX1; } /*********************************************************************//** * @brief * The getFPGAX2RawPressure function gets the X2 pressure reading. * @details \b Inputs: fpgaSensorReadings.pressureX2 * @details \b Outputs: none * @return X2 pressure *************************************************************************/ S16 getFPGAX2RawPressure( void ) { return fpgaSensorReadings.pressureX2; } /*********************************************************************//** * @brief * The getFPGAX2RawTemperature function gets the X2 sensor temperature. * @details \b Inputs: fpgaSensorReadings.temperatureX2 * @details \b Outputs: none * @return X2 sensor temperature *************************************************************************/ S16 getFPGAX2RawTemperature( void ) { return fpgaSensorReadings.temperatureX2; } /*********************************************************************//** * @brief * The getFPGAX1ReadCount function gets the X2 sensor read count. * @details \b Inputs: fpgaSensorReadings.readCountX2 * @details \b Outputs: none * @return X2 sensor read count *************************************************************************/ U08 getFPGAX2ReadCount( void ) { return fpgaSensorReadings.readCountX2; } /*********************************************************************//** * @brief * The getFPGAX3RawPressure function gets the X3 pressure reading. * @details \b Inputs: fpgaSensorReadings.pressureX3 * @details \b Outputs: none * @return X3 pressure *************************************************************************/ S16 getFPGAX3RawPressure( void ) { return fpgaSensorReadings.pressureX3; } /*********************************************************************//** * @brief * The getFPGAX3RawTemperature function gets the X3 sensor temperature. * @details \b Inputs: fpgaSensorReadings.temperatureX3 * @details \b Outputs: none * @return X3 sensor temperature *************************************************************************/ S16 getFPGAX3RawTemperature( void ) { return fpgaSensorReadings.temperatureX3; } /*********************************************************************//** * @brief * The getFPGAX3ReadCount function gets the X3 sensor read count. * @details \b Inputs: fpgaSensorReadings.readCountX3 * @details \b Outputs: none * @return X3 sensor read count *************************************************************************/ U08 getFPGAX3ReadCount( void ) { return fpgaSensorReadings.readCountX3; } /*********************************************************************//** * @brief * The getFPGAX4RawPressure function gets the X4 pressure reading. * @details \b Inputs: fpgaSensorReadings.pressureX4 * @details \b Outputs: none * @return X4 pressure *************************************************************************/ S16 getFPGAX4RawPressure( void ) { return fpgaSensorReadings.pressureX4; } /*********************************************************************//** * @brief * The getFPGAX4RawTemperature function gets the X4 sensor temperature. * @details \b Inputs: fpgaSensorReadings.temperatureX4 * @details \b Outputs: none * @return X4 sensor temperature *************************************************************************/ S16 getFPGAX4RawTemperature( void ) { return fpgaSensorReadings.temperatureX4; } /*********************************************************************//** * @brief * The getFPGAX4ReadCount function gets the X4 sensor read count. * @details \b Inputs: fpgaSensorReadings.readCountX4 * @details \b Outputs: none * @return X4 sensor read count *************************************************************************/ U08 getFPGAX4ReadCount( void ) { return fpgaSensorReadings.readCountX4; } /*********************************************************************//** * @brief * The getFPGAX5RawPressure function gets the X5 pressure reading. * @details \b Inputs: fpgaSensorReadings.pressureX5 * @details \b Outputs: none * @return X5 pressure *************************************************************************/ S16 getFPGAX5RawPressure( void ) { return fpgaSensorReadings.pressureX5; } /*********************************************************************//** * @brief * The getFPGAX5RawTemperature function gets the X5 sensor temperature. * @details \b Inputs: fpgaSensorReadings.temperatureX5 * @details \b Outputs: none * @return X5 sensor temperature *************************************************************************/ S16 getFPGAX5RawTemperature( void ) { return fpgaSensorReadings.temperatureX5; } /*********************************************************************//** * @brief * The getFPGAX5ReadCount function gets the X5 sensor read count. * @details \b Inputs: fpgaSensorReadings.readCountX5 * @details \b Outputs: none * @return X5 sensor read count *************************************************************************/ U08 getFPGAX5ReadCount( void ) { return fpgaSensorReadings.readCountX5; } /*********************************************************************//** * @brief * The getFPGAP23Temperature function gets the TRO1 temperature sensor reading. * @details \b Inputs: fpgaSensorReadings.tempP23 * @details \b Outputs: none * @return P23 temperature sensor reading *************************************************************************/ U32 getFPGAP23Temperature( void ) { return fpgaSensorReadings.tempP23; } /*********************************************************************//** * @brief * The getFPGAP22Temperature function gets the TRO2 temperature sensor reading. * @details \b Inputs: fpgaSensorReadings.tempP22 * @details \b Outputs: none * @return P22 temperature sensor reading *************************************************************************/ U32 getFPGAP22Temperature( void ) { return fpgaSensorReadings.tempP22; } /*********************************************************************//** * @brief * The getFPGAP25FloaterState function gets the P25 floater level state. * @details \b Inputs: fpgaSensorReadings.levelSwitch * @details \b Outputs: none * @return P25 floater level state *************************************************************************/ U08 getFPGAP25FloaterState( void ) { return fpgaSensorReadings.p25LevelSwitch; } /*********************************************************************//** * @brief * The getFPGAFlowFMP function gets the P16 flow rate (in mL/min). * @details \b Inputs: fpgaSensorReadings.flowRateP16 * @details \b Outputs: none * @return P16 flow rate (in mL/min) *************************************************************************/ U16 getFPGAFlowP16( void ) { return fpgaSensorReadings.flowRateP16; } /*********************************************************************//** * @brief * The getFPGAFlowP16Temp function gets the P16 flow sensor temperature, the * temperature of the fluid flowing through the sensor. * @details \b Inputs: fpgaSensorReadings.flowTempP16 * @details \b Outputs: none * @return P16 fluid temperature *************************************************************************/ U16 getFPGAFlowP16Temp( void ) { return fpgaSensorReadings.flowTempP16; } /*********************************************************************//** * @brief * The getFPGAFlowP7 function gets the P7 flow rate (in mL/min). * @details \b Inputs: fpgaSensorReadings.flowRateP7 * @details \b Outputs: none * @return P7 flow rate (in mL/min) *************************************************************************/ U16 getFPGAFlowP7( void ) { return fpgaSensorReadings.flowRateP7; } /*********************************************************************//** * @brief * The getFPGAFlowP7Temp function gets the P7 flow sensor temperature, the * temperature of the fluid flowing through the sensor. * @details \b Inputs: fpgaSensorReadings.flowTempP7 * @details \b Outputs: none * @return P7 fluid temperature *************************************************************************/ U16 getFPGAFlowP7Temp( void ) { return fpgaSensorReadings.flowTempP7; } /*********************************************************************//** * @brief * The setFPGAP9Control function sets the FPGA P9 sensor control register * to perform a given action. * bit 4..7: unused * bit 3: Enable P9 read transaction; address needed * bit 2: Enable P9 write transaction; address and data needs to be set * bit 1: Enable P9 initialization procedure * bit 0: reset P9 sensor * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.conductivityP9Control * @param control bits indicating control action to take * @return none *************************************************************************/ void setFPGAP9Control( U08 control ) { fpgaActuatorSetPoints.conductivityP9Control = control; } /*********************************************************************//** * @brief * The setFPGAP9Address function sets the read/write address for a read/write * action on the P9 sensor. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.conductivityP9Address * @param address The P9 sensor address to read from or write to * @return none *************************************************************************/ void setFPGAP9Address( U16 address ) { fpgaActuatorSetPoints.conductivityP9Address = address; } /*********************************************************************//** * @brief * The setFPGAP9Data function sets the write data for a write action on * the P9 sensor. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.conductivityP9Data * @param data The 32-bit data to write to the P9 sensor * @return none *************************************************************************/ void setFPGAP9Data( U32 data ) { fpgaActuatorSetPoints.conductivityP9Data = data; } /*********************************************************************//** * @brief * The setFPGAP18Control function sets the FPGA P18 sensor control register * to perform a given action. * bit 4..7: unused * bit 3: Enable P18 read transaction; address needed * bit 2: Enable P18 write transaction; address and data needs to be set * bit 1: Enable P18 initialization procedure * bit 0: reset P18 sensor * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.conductivityP18Control * @param control bits indicating control action to take * @return none *************************************************************************/ void setFPGAP18Control( U08 control ) { fpgaActuatorSetPoints.conductivityP18Control = control; } /*********************************************************************//** * @brief * The setFPGAP18Address function sets the read/write address for a read/write * action on the P18 sensor. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.conductivityP18Address * @param address The P18 sensor address to read from or write to * @return none *************************************************************************/ void setFPGAP18Address( U16 address ) { fpgaActuatorSetPoints.conductivityP18Address = address; } /*********************************************************************//** * @brief * The setFPGAP18Data function sets the write data for a write action on * the P18 sensor. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.conductivityP18Data * @param data The 32-bit data to write to the P18 sensor * @return none *************************************************************************/ void setFPGAP18Data( U32 data ) { fpgaActuatorSetPoints.conductivityP18Data = data; } /*********************************************************************//** * @brief * The setFPGAP9Reset function sets the reset command bit for P9 sensor. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.conductivityP9Control * @return none *************************************************************************/ void setFPGAP9Reset( void ) { fpgaActuatorSetPoints.conductivityP9Control |= FPGA_CONDUCTIVITY_RESET_BIT; } /*********************************************************************//** * @brief * The clearFPGAP9Reset function clears the reset command bit for P9 sensor. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.conductivityP9Control * @return none *************************************************************************/ void clearFPGAP9Reset( void ) { fpgaActuatorSetPoints.conductivityP9Control &= ~FPGA_CONDUCTIVITY_RESET_BIT; } /*********************************************************************//** * @brief * The setFPGAP9InitEnable function sets the initialize command bit for * P9 sensor. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.conductivityP9Control * @return none *************************************************************************/ void setFPGAP9InitEnable( void ) { fpgaActuatorSetPoints.conductivityP9Control |= FPGA_CONDUCTIVITY_INIT_ENABLE_BIT; } /*********************************************************************//** * @brief * The clearFPGAP9InitEnable function clears the initialize command bit for * P9 sensor. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.conductivityP9Control * @return none *************************************************************************/ void clearFPGAP9InitEnable( void ) { fpgaActuatorSetPoints.conductivityP9Control &= ~FPGA_CONDUCTIVITY_INIT_ENABLE_BIT; } /*********************************************************************//** * @brief * The setFPGAP9WriteEnable function sets the write enable command bit for * P9 sensor. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.conductivityP9Control * @return none *************************************************************************/ void setFPGAP9WriteEnable( void ) { fpgaActuatorSetPoints.conductivityP9Control |= FPGA_CONDUCTIVITY_WR_ENABLE_BIT; } /*********************************************************************//** * @brief * The clearFPGAP9WriteEnable function clears the write enable command bit * for P9 sensor. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.conductivityP9Control * @return none *************************************************************************/ void clearFPGAP9WriteEnable( void ) { fpgaActuatorSetPoints.conductivityP9Control &= ~FPGA_CONDUCTIVITY_WR_ENABLE_BIT; } /*********************************************************************//** * @brief * The setFPGAP9ReadEnable function sets the read enable command bit for * P9 sensor. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.conductivityP9Control * @return none *************************************************************************/ void setFPGAP9ReadEnable( void ) { fpgaActuatorSetPoints.conductivityP9Control |= FPGA_CONDUCTIVITY_RD_ENABLE_BIT; } /*********************************************************************//** * @brief * The clearFPGAP9ReadEnable function clears the read enable command bit * for P9 sensor. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.conductivityP9Control * @return none *************************************************************************/ void clearFPGAP9ReadEnable( void ) { fpgaActuatorSetPoints.conductivityP9Control &= ~FPGA_CONDUCTIVITY_RD_ENABLE_BIT; } /*********************************************************************//** * @brief * The setFPGAP18Reset function sets the reset command bit for P18 sensor. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.conductivityP18Control * @return none *************************************************************************/ void setFPGAP18Reset( void ) { fpgaActuatorSetPoints.conductivityP18Control |= FPGA_CONDUCTIVITY_RESET_BIT; } /*********************************************************************//** * @brief * The clearFPGAP18Reset function clears the reset command bit for P18 sensor. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.conductivityP18Control * @return none *************************************************************************/ void clearFPGAP18Reset( void ) { fpgaActuatorSetPoints.conductivityP18Control &= ~FPGA_CONDUCTIVITY_RESET_BIT; } /*********************************************************************//** * @brief * The setFPGAP18InitEnable function sets the initialize command bit for * P18 sensor. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.conductivityP18Control * @return none *************************************************************************/ void setFPGAP18InitEnable( void ) { fpgaActuatorSetPoints.conductivityP18Control |= FPGA_CONDUCTIVITY_INIT_ENABLE_BIT; } /*********************************************************************//** * @brief * The clearFPGAP18InitEnable function clears the initialize command bit for * P18 sensor. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.conductivityP18Control * @return none *************************************************************************/ void clearFPGAP18InitEnable( void ) { fpgaActuatorSetPoints.conductivityP18Control &= ~FPGA_CONDUCTIVITY_INIT_ENABLE_BIT; } /*********************************************************************//** * @brief * The setFPGAP18WriteEnable function sets the write enable command bit for * P18 sensor. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.conductivityP18Control * @return none *************************************************************************/ void setFPGAP18WriteEnable( void ) { fpgaActuatorSetPoints.conductivityP18Control |= FPGA_CONDUCTIVITY_WR_ENABLE_BIT; } /*********************************************************************//** * @brief * The clearFPGAP18WriteEnable function clears the write enable command bit * for P18 sensor. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.conductivityP18Control * @return none *************************************************************************/ void clearFPGAP18WriteEnable( void ) { fpgaActuatorSetPoints.conductivityP18Control &= ~FPGA_CONDUCTIVITY_WR_ENABLE_BIT; } /*********************************************************************//** * @brief * The setFPGAP18ReadEnable function sets the read enable command bit for * P18 sensor. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.conductivityP18Control * @return none *************************************************************************/ void setFPGAP18ReadEnable( void ) { fpgaActuatorSetPoints.conductivityP18Control |= FPGA_CONDUCTIVITY_RD_ENABLE_BIT; } /*********************************************************************//** * @brief * The clearFPGAP18ReadEnable function clears the read enable command bit * for P18 sensor. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.conductivityP18Control * @return none *************************************************************************/ void clearFPGAP18ReadEnable( void ) { fpgaActuatorSetPoints.conductivityP18Control &= ~FPGA_CONDUCTIVITY_RD_ENABLE_BIT; } /*********************************************************************//** * @brief * The getFPGAP9ReadCount function gets the latest P9 sensor read count. * @details \b Inputs: fpgaSensorReadings.conductivityP9ReadCount * @details \b Outputs: none * @return Current read count for P9 sensor. *************************************************************************/ U08 getFPGAP9ReadCount( void ) { return fpgaSensorReadings.conductivityP9ReadCount; } /*********************************************************************//** * @brief * The getFPGAP9ErrorCount function gets the latest P9 sensor error count. * @details \b Inputs: fpgaSensorReadings.conductivityP9ErrorCount * @details \b Outputs: none * @return Current error count for P9 sensor. *************************************************************************/ U08 getFPGAP9ErrorCount( void ) { return fpgaSensorReadings.conductivityP9ErrorCount; } /*********************************************************************//** * @brief * The getFPGAP9Conductivity function gets the latest P9 sensor conductivity * reading. * @details \b Inputs: fpgaSensorReadings.conductivityP9Cond * @details \b Outputs: none * @return Current conductivity reading from P9 sensor. *************************************************************************/ U16 getFPGAP9Conductivity( void ) { return fpgaSensorReadings.conductivityP9Cond; } /*********************************************************************//** * @brief * The getFPGAP9Temperature function gets the latest P9 sensor temperature. * @details \b Inputs: fpgaSensorReadings.conductivityP9Temp * @details \b Outputs: none * @return Current temperature from P9 sensor. *************************************************************************/ U16 getFPGAP9Temperature( void ) { return fpgaSensorReadings.conductivityP9Temp; } /*********************************************************************//** * @brief * The getFPGAP9Data function gets the latest P9 sensor data from a read * action. * @details \b Inputs: fpgaSensorReadings.conductivityP9Data * @details \b Outputs: none * @return Latest data read from P9 sensor. *************************************************************************/ U32 getFPGAP9Data( void ) { return fpgaSensorReadings.conductivityP9Data; } /*********************************************************************//** * @brief * The getFPGAP18ReadCount function gets the latest P18 sensor read count. * @details \b Inputs: fpgaSensorReadings.conductivityP18ReadCount * @details \b Outputs: none * @return Current read count for P18 sensor. *************************************************************************/ U08 getFPGAP18ReadCount( void ) { return fpgaSensorReadings.conductivityP18ReadCount; } /*********************************************************************//** * @brief * The getFPGAP18ErrorCount function gets the latest P18 sensor error count. * @details \b Inputs: fpgaSensorReadings.conductivityP18ErrorCount * @details \b Outputs: none * @return Current error count for P18 sensor. *************************************************************************/ U08 getFPGAP18ErrorCount( void ) { return fpgaSensorReadings.conductivityP18ErrorCount; } /*********************************************************************//** * @brief * The getFPGAP18Conductivity function gets the latest P18 sensor conductivity * reading. * @details \b Inputs: fpgaSensorReadings.conductivityP18Cond * @details \b Outputs: none * @return Current conductivity reading from P18 sensor. *************************************************************************/ U16 getFPGAP18Conductivity( void ) { return fpgaSensorReadings.conductivityP18Cond; } /*********************************************************************//** * @brief * The getFPGAP18Temperature function gets the latest P18 sensor temperature. * @details \b Inputs: fpgaSensorReadings.conductivityP18Temp * @details \b Outputs: none * @return Current temperature from P18 sensor. *************************************************************************/ U16 getFPGAP18Temperature( void ) { return fpgaSensorReadings.conductivityP18Temp; } /*********************************************************************//** * @brief * The getFPGAP18Data function gets the latest P18 sensor data from a read * action. * @details \b Inputs: fpgaSensorReadings.conductivityP18Data * @details \b Outputs: none * @return Latest data read from P18 sensor. *************************************************************************/ U32 getFPGAP18Data( void ) { return fpgaSensorReadings.conductivityP18Data; } /*********************************************************************//** * @brief * The setFPGAP40PumpEnable function enables or disables the P40 pump. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.p40PumpControl * @param enable flag indicating whether to enable or disable the P40 pump. * @return none *************************************************************************/ void setFPGAP40PumpEnable( BOOL enable ) { fpgaActuatorSetPoints.p40PumpControl = ( TRUE == enable ? 0x1 : 0x0 ); } /*********************************************************************//** * @brief * The setFPGAP40PumpPWM function sets the P40 pump PWM duty cycle. * The higher the PWM duty cycle (0..500), the faster the pump will go. * @note PWM values < 5% or > 95% will cause pump to stop so effective * range is actually 25..475. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.p40PumpPWMDutyCyclePct * @param pwm PWM duty cycle magnitude * @return none *************************************************************************/ void setFPGAP40PumpPWM( U16 pwm ) { fpgaActuatorSetPoints.p40PumpPWMDutyCyclePct = pwm; } /*********************************************************************//** * @brief * The getFPGAP12PumpPWM function gets a read back from FPGA of RO pump PWM * duty cycle. * @details \b Inputs: fpgaSensorReadings.p40PumpPWMReadback * @details \b Outputs: none * @return measured speed (RPM) of the P40 pump *************************************************************************/ U16 getFPGAP40PumpPWM( void ) { return fpgaSensorReadings.p40PumpPWMReadback; } /*********************************************************************//** * @brief * The getFPGAP12PumpTachCount function gets the running 16-bit tachometer count * from the P40 pump hall sensor. * @details \b Inputs: fpgaSensorReadings.p40PumpTachCount * @details \b Outputs: none * @return P40 pump tachometer count *************************************************************************/ U16 getFPGAP40PumpTachCount( void ) { return fpgaSensorReadings.p40PumpTachCount; } /**@}*/