Index: firmware/App/Services/FpgaDD.c =================================================================== diff -u -r62b2fbf5fe54af2e7d62fb6d51c6f18818260ab1 -r9c7607074082ad818ca3ee4c98c0c19208395fce --- firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision 62b2fbf5fe54af2e7d62fb6d51c6f18818260ab1) +++ firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision 9c7607074082ad818ca3ee4c98c0c19208395fce) @@ -39,14 +39,25 @@ // ********** private definitions ********** /// Macro to retrieve the FPGA sensor field based on HW type -#define GET_FPGA_SENSOR_FIELD(field) (getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_2_0_HW ) == TRUE ? fpgaBeta2SensorReadings.field : fpgaSensorReadings.field) +#define GET_FPGA_SENSOR_FIELD(field) (getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_2_0_HW ) == TRUE ? fpgaSensorReadings.field : fpgaBeta19SensorReadings.field) +//#define GET_FPGA_SENSOR_FIELD(field) (fpgaSensorReadings.field) /// Macro to retrieve the FPGA sensor field based on HW type -#define GET_FPGA_ACTUATOR_FIELD(field) (getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_2_0_HW ) == TRUE ? fpgaBeta2ActuatorSetPoints.field : fpgaActuatorSetPoints.field) +#define GET_FPGA_ACTUATOR_FIELD(field) (getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_2_0_HW ) == TRUE ? fpgaActuatorSetPoints.field : fpgaBeta19ActuatorSetPoints.field) +//#define GET_FPGA_ACTUATOR_FIELD(field) (fpgaActuatorSetPoints.field) /// Macro to set the FPGA actuator field value based on HW type -#define SET_FPGA_ACTUATOR_FIELD(field, value) (getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_2_0_HW ) == TRUE ? fpgaBeta2ActuatorSetPoints.field = value: fpgaActuatorSetPoints.field = value) +#define SET_FPGA_ACTUATOR_FIELD(field, value) (getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_2_0_HW ) == TRUE ? ( fpgaActuatorSetPoints.field = value ) : ( fpgaBeta19ActuatorSetPoints.field = value )) +//#define SET_FPGA_ACTUATOR_FIELD(field, value) (fpgaActuatorSetPoints.field = value) +/// Macro to set the FPGA actuator bits based on HW type +#define SET_FPGA_ACTUATOR_BITS(field, bits) (getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_2_0_HW ) == TRUE ? ( fpgaActuatorSetPoints.field |= bits ) : ( fpgaBeta19ActuatorSetPoints.field |= bits )) +//#define SET_FPGA_ACTUATOR_BITS(field, bits) (fpgaActuatorSetPoints.field |= bits) + +/// Macro to clear the FPGA actuator bits based on HW type +#define CLEAR_FPGA_ACTUATOR_BITS(field, bits) (getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_2_0_HW ) == TRUE ? ( fpgaActuatorSetPoints.field &= bits ) : ( fpgaBeta19ActuatorSetPoints.field &= bits )) +//#define CLEAR_FPGA_ACTUATOR_BITS(field, bits) (fpgaActuatorSetPoints.field &= bits) + #define FPGA_EXPECTED_ID 0x04 ///< FPGA expected ID. #define MAX_COMM_ERROR_RETRIES 5 ///< Maximum number of communication error retries @@ -133,6 +144,7 @@ U08 fpgaRevLab; ///< Reg 3. FPGA revision (lab) being reported } FPGA_HEADER_T; // read only on FPGA +#if 1 // Remove when Beta 1.9 is obselete /// FPGA sensor readings struct. typedef struct { @@ -272,7 +284,8 @@ U08 fpgaD74CondReadCnt; ///< Reg 758. D74 successful read count U08 fpgaD74CondErrorCnt; ///< Reg 759. D74 error read count -} DD_FPGA_SENSORS_T; +} DD_FPGA_SENSORS_BETA_1_9_T; +#endif typedef struct { @@ -435,8 +448,9 @@ U08 fpgaP18TempReadCount; ///< Reg 818. P19 temperature successful read count U08 fpgaP18TempErrorCount; ///< Reg 819. P19 Temperature error read count U08 fpgaP18CalMemCounter; ///< Reg 820. TBD -} DD_FPGA_SENSORS_BETA_2_T; +} DD_FPGA_SENSORS_T; +#if 1 // Remove when Beta 1.9 is obselete typedef struct { U16 fpgaValveControl; ///< Reg 04. Valve control register @@ -514,7 +528,8 @@ U08 fpgaConSensD43Control; ///< Reg 118. Conductivity/Temperature Sensors D43 Control registers U16 fpgaConSensD43_Addrs; ///< Reg 119. D43 Initialization Address register U32 fpgaConSensD43_Data_In; ///< Reg 121. D43 Initialization data register -} FPGA_ACTUATORS_T; +} FPGA_ACTUATORS_BETA_1_9_T; +#endif typedef struct { @@ -597,16 +612,16 @@ U32 fpgaD11PumpSpeed; ///< Reg 126. Acid Concentrate Pump Speed/RPM Control U32 fpgaD10PumpSpeed; ///< Reg 130. BiCarb Concentrate Pump Speed/RPM Control U32 fpgaD76PumpSpeed; ///< Reg 134. UF Pump Speed/RPM Control -} FPGA_ACTUATORS_BETA_2_T; +} FPGA_ACTUATORS_T; #pragma pack(pop) // ********** private data ********** -static FPGA_HEADER_T fpgaHeader; ///< FPGA header structure. -static DD_FPGA_SENSORS_T fpgaSensorReadings; ///< DD FPGA sensors structure. -static FPGA_ACTUATORS_T fpgaActuatorSetPoints; ///< FPGA actuator set points structure. -static DD_FPGA_SENSORS_BETA_2_T fpgaBeta2SensorReadings; ///< DD FPGA sensors structure for beta 2. -static FPGA_ACTUATORS_BETA_2_T fpgaBeta2ActuatorSetPoints; ///< FPGA actuator set points structure for beta 2. +static FPGA_HEADER_T fpgaHeader; ///< FPGA header structure. +static DD_FPGA_SENSORS_BETA_1_9_T fpgaBeta19SensorReadings; ///< DD FPGA sensors structure. +static FPGA_ACTUATORS_BETA_1_9_T fpgaBeta19ActuatorSetPoints; ///< FPGA actuator set points structure. +static DD_FPGA_SENSORS_T fpgaSensorReadings; ///< DD FPGA sensors structure for beta 2. +static FPGA_ACTUATORS_T fpgaActuatorSetPoints; ///< FPGA actuator set points structure for beta 2. // ********** private function prototypes ********** @@ -622,18 +637,18 @@ void initFPGADD( void ) { // Initialize fpga driver - initFPGA( (U08*)&fpgaHeader, (U08*)&fpgaSensorReadings, (U08*)&fpgaActuatorSetPoints, - sizeof(FPGA_HEADER_T), sizeof(DD_FPGA_SENSORS_T), sizeof(FPGA_ACTUATORS_T) ); + initFPGA( (U08*)&fpgaHeader, (U08*)&fpgaBeta19SensorReadings, (U08*)&fpgaBeta19ActuatorSetPoints, + sizeof(FPGA_HEADER_T), sizeof(DD_FPGA_SENSORS_BETA_1_9_T), sizeof(FPGA_ACTUATORS_BETA_1_9_T) ); // initialize fpga data structures memset( &fpgaHeader, 0, sizeof( FPGA_HEADER_T ) ); + memset( &fpgaBeta19SensorReadings, 0, sizeof( DD_FPGA_SENSORS_BETA_1_9_T ) ); + memset( &fpgaBeta19ActuatorSetPoints, 0, sizeof( FPGA_ACTUATORS_BETA_1_9_T ) ); + + // initialize FPGA data structure for beta 2 HW memset( &fpgaSensorReadings, 0, sizeof( DD_FPGA_SENSORS_T ) ); memset( &fpgaActuatorSetPoints, 0, sizeof( FPGA_ACTUATORS_T ) ); - // initialize FPGA data structure for beta 2 HW - memset( &fpgaBeta2SensorReadings, 0, sizeof( DD_FPGA_SENSORS_BETA_2_T ) ); - memset( &fpgaBeta2ActuatorSetPoints, 0, sizeof( FPGA_ACTUATORS_BETA_2_T ) ); - // Set the valve control mode and default state of valve fpgaActuatorSetPoints.fpgaValveControl = FPGA_ENABLE_VALVES_CONTROL; fpgaActuatorSetPoints.fpgaValvePWMEnable = FPGA_ENABLE_VALVES_PWM; @@ -643,14 +658,16 @@ fpgaActuatorSetPoints.fpgaDDSpareValvePWMControl = FPGA_ENABLE_UF_VALVES_PWM; fpgaActuatorSetPoints.fpgaADCControl = FPGA_ADC_AUTO_READ_ENABLE; - // Set the valve control mode and default state of valve for Beta 2.0 HW - fpgaBeta2ActuatorSetPoints.fpgaValveControl = FPGA_ENABLE_VALVES_CONTROL; - fpgaBeta2ActuatorSetPoints.fpgaValvePWMEnable = FPGA_ENABLE_VALVES_PWM; - fpgaBeta2ActuatorSetPoints.fpgaBCValveControl = FPGA_ENABLE_BC_VALVES_CONTROL; - fpgaBeta2ActuatorSetPoints.fpgaBCValvePWMControl = FPGA_ENABLE_BC_VALVES_PWM; - fpgaBeta2ActuatorSetPoints.fpgaDDSpareValveControl = FPGA_ENABLE_SPARE_VALVES_CNTRL; - fpgaBeta2ActuatorSetPoints.fpgaDDSpareValvePWMControl = FPGA_ENABLE_UF_VALVES_PWM; - fpgaBeta2ActuatorSetPoints.fpgaADCControl = FPGA_ADC_AUTO_READ_ENABLE; +#if 1 + // Set the valve control mode and default state of valve for Beta 1.9 HW + fpgaBeta19ActuatorSetPoints.fpgaValveControl = FPGA_ENABLE_VALVES_CONTROL; + fpgaBeta19ActuatorSetPoints.fpgaValvePWMEnable = FPGA_ENABLE_VALVES_PWM; + fpgaBeta19ActuatorSetPoints.fpgaBCValveControl = FPGA_ENABLE_BC_VALVES_CONTROL; + fpgaBeta19ActuatorSetPoints.fpgaBCValvePWMControl = FPGA_ENABLE_BC_VALVES_PWM; + fpgaBeta19ActuatorSetPoints.fpgaDDSpareValveControl = FPGA_ENABLE_SPARE_VALVES_CNTRL; + fpgaBeta19ActuatorSetPoints.fpgaDDSpareValvePWMControl = FPGA_ENABLE_UF_VALVES_PWM; + fpgaBeta19ActuatorSetPoints.fpgaADCControl = FPGA_ADC_AUTO_READ_ENABLE; +#endif // 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); @@ -669,14 +686,14 @@ if ( isHWBeta2 != TRUE ) { // Initialize fpga driver - initFPGA( (U08*)&fpgaHeader, (U08*)&fpgaSensorReadings, (U08*)&fpgaActuatorSetPoints, - sizeof(FPGA_HEADER_T), sizeof(DD_FPGA_SENSORS_T), sizeof(FPGA_ACTUATORS_T) ); + initFPGA( (U08*)&fpgaHeader, (U08*)&fpgaBeta19SensorReadings, (U08*)&fpgaBeta19ActuatorSetPoints, + sizeof(FPGA_HEADER_T), sizeof(DD_FPGA_SENSORS_BETA_1_9_T), sizeof(FPGA_ACTUATORS_BETA_1_9_T) ); } else { // Initialize fpga driver for beta 2 hardware - initFPGA( (U08*)&fpgaHeader, (U08*)&fpgaBeta2SensorReadings, (U08*)&fpgaBeta2ActuatorSetPoints, - sizeof(FPGA_HEADER_T), sizeof(DD_FPGA_SENSORS_BETA_2_T), sizeof(FPGA_ACTUATORS_BETA_2_T) ); + initFPGA( (U08*)&fpgaHeader, (U08*)&fpgaSensorReadings, (U08*)&fpgaActuatorSetPoints, + sizeof(FPGA_HEADER_T), sizeof(DD_FPGA_SENSORS_T), sizeof(FPGA_ACTUATORS_T) ); } } @@ -697,14 +714,14 @@ if ( FPGA_EXPECTED_ID == fpgaHeader.fpgaId ) { // Check FPGA compatibility w/ firmware - if ( DD_FPGA_COMPATIBILITY_REV == fpgaSensorReadings.fpgaCompatibilityRev ) + if ( DD_FPGA_COMPATIBILITY_REV == GET_FPGA_SENSOR_FIELD( fpgaCompatibilityRev ) ) { result = SELF_TEST_STATUS_PASSED; } else { result = SELF_TEST_STATUS_FAILED; - SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_FPGA_POST_TEST_FAILED, (U32)DD_FPGA_COMPATIBILITY_REV, (U32)fpgaSensorReadings.fpgaCompatibilityRev ) + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_FPGA_POST_TEST_FAILED, (U32)DD_FPGA_COMPATIBILITY_REV, (U32)GET_FPGA_SENSOR_FIELD( fpgaCompatibilityRev ) ) } } else @@ -848,7 +865,7 @@ * an 8-bit mask representing the set of states with a 1 meaning "enabled" * and a 0 meaning "disabled". * @details \b Inputs: none - * @details \b Outputs: fpgaSensorReadings.fpgaValvePWMEnableStates + * @details \b Outputs: fpgaValvePWMEnableStates * @return none *************************************************************************/ U16 getFPGAValveDDPWMEnable( void ) @@ -919,7 +936,7 @@ * an 8-bit mask representing the set of states with a 1 meaning "enabled" * and a 0 meaning "disabled". * @details \b Inputs: none - * @details \b Outputs: fpgaSensorReadings.fpgaValveBCPWMStates + * @details \b Outputs: fpgaValveBCPWMStates * @return none *************************************************************************/ U08 getFPGAValveBCPWMEnable( void ) @@ -990,7 +1007,7 @@ * an 8-bit mask representing the set of states with a 1 meaning "enabled" * and a 0 meaning "disabled". * @details \b Inputs: none - * @details \b Outputs: fpgaSensorReadings.fpgaValveSpPWMStates + * @details \b Outputs: fpgaValveSpPWMStates * @return none *************************************************************************/ U08 getFPGAValveSPPWMEnable( void ) @@ -1187,8 +1204,8 @@ *************************************************************************/ void setFPGAD11PumpControl( U08 control ) { - SET_FPGA_ACTUATOR_FIELD( fpgaD11PumpControl ) &= FPGA_CONC_PUMP_PARK_COMMAND; // preserve msb (park command bit) - SET_FPGA_ACTUATOR_FIELD( fpgaD11PumpControl ) |= control; + CLEAR_FPGA_ACTUATOR_BITS( fpgaD11PumpControl, FPGA_CONC_PUMP_PARK_COMMAND); // preserve msb (park command bit) + SET_FPGA_ACTUATOR_BITS( fpgaD11PumpControl, control); } /*********************************************************************//** @@ -1208,8 +1225,8 @@ *************************************************************************/ void setFPGAD10PumpControl( U08 control ) { - SET_FPGA_ACTUATOR_FIELD( fpgaD10PumpControl ) &= FPGA_CONC_PUMP_PARK_COMMAND; // preserve msb (park command bit) - SET_FPGA_ACTUATOR_FIELD( fpgaD10PumpControl ) |= control; + CLEAR_FPGA_ACTUATOR_BITS( fpgaD10PumpControl, FPGA_CONC_PUMP_PARK_COMMAND ); // preserve msb (park command bit) + SET_FPGA_ACTUATOR_BITS( fpgaD10PumpControl, control ); } /*********************************************************************//** @@ -1229,8 +1246,8 @@ *************************************************************************/ void setFPGAD76PumpControl( U08 control ) { - SET_FPGA_ACTUATOR_FIELD( fpgaD76PumpControl ) &= FPGA_CONC_PUMP_PARK_COMMAND; // preserve msb (park command bit) - SET_FPGA_ACTUATOR_FIELD( fpgaD76PumpControl ) |= control; + CLEAR_FPGA_ACTUATOR_BITS( fpgaD76PumpControl, FPGA_CONC_PUMP_PARK_COMMAND ); // preserve msb (park command bit) + SET_FPGA_ACTUATOR_BITS( fpgaD76PumpControl, control ); } /*********************************************************************//** @@ -1246,7 +1263,7 @@ *************************************************************************/ void setFPGAD11PumpParkCmd( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaD11PumpControl ) |= FPGA_CONC_PUMP_PARK_COMMAND; // this bit must be cleared after next transmit to prevent continuous park commands + SET_FPGA_ACTUATOR_BITS( fpgaD11PumpControl, FPGA_CONC_PUMP_PARK_COMMAND ); // this bit must be cleared after next transmit to prevent continuous park commands } /*********************************************************************//** @@ -1262,7 +1279,7 @@ *************************************************************************/ void setFPGAD10PumpParkCmd( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaD10PumpControl ) |= FPGA_CONC_PUMP_PARK_COMMAND; // this bit must be cleared after next transmit to prevent continuous park commands + SET_FPGA_ACTUATOR_BITS( fpgaD10PumpControl, FPGA_CONC_PUMP_PARK_COMMAND ); // this bit must be cleared after next transmit to prevent continuous park commands } /*********************************************************************//** @@ -1278,7 +1295,7 @@ *************************************************************************/ void setFPGAD76PumpParkCmd( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaD76PumpControl ) |= FPGA_CONC_PUMP_PARK_COMMAND; // this bit must be cleared after next transmit to prevent continuous park commands + SET_FPGA_ACTUATOR_BITS( fpgaD76PumpControl, FPGA_CONC_PUMP_PARK_COMMAND ); // this bit must be cleared after next transmit to prevent continuous park commands } /*********************************************************************//** @@ -1292,7 +1309,7 @@ *************************************************************************/ void setFPGAD17CondReset( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD17D74Control ) |= FPGA_D17_RESET_BIT; + SET_FPGA_ACTUATOR_BITS( fpgaConSensD17D74Control, FPGA_D17_RESET_BIT ); } /*********************************************************************//** @@ -1306,7 +1323,7 @@ *************************************************************************/ void clearFPGAD17CondReset( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD17D74Control ) &= ~FPGA_D17_RESET_BIT; + CLEAR_FPGA_ACTUATOR_BITS( fpgaConSensD17D74Control, ~FPGA_D17_RESET_BIT ); } /*********************************************************************//** @@ -1320,7 +1337,7 @@ *************************************************************************/ void setFPGAD17CondInitEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD17D74Control ) |= FPGA_D17_INIT_ENABLE_BIT; + SET_FPGA_ACTUATOR_BITS( fpgaConSensD17D74Control, FPGA_D17_INIT_ENABLE_BIT ); } /*********************************************************************//** @@ -1334,7 +1351,7 @@ *************************************************************************/ void clearFPGAD17CondInitEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD17D74Control ) &= ~FPGA_D17_INIT_ENABLE_BIT; + CLEAR_FPGA_ACTUATOR_BITS( fpgaConSensD17D74Control, ~FPGA_D17_INIT_ENABLE_BIT ); } /*********************************************************************//** @@ -1351,7 +1368,7 @@ *************************************************************************/ void setFPGAD17CondWriteEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD17D74Control ) |= FPGA_D17_WR_ENABLE_BIT; + SET_FPGA_ACTUATOR_BITS( fpgaConSensD17D74Control, FPGA_D17_WR_ENABLE_BIT ); } /*********************************************************************//** @@ -1365,7 +1382,7 @@ *************************************************************************/ void clearFPGAD17CondWriteEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD17D74Control ) &= ~FPGA_D17_WR_ENABLE_BIT; + CLEAR_FPGA_ACTUATOR_BITS( fpgaConSensD17D74Control, ~FPGA_D17_WR_ENABLE_BIT ); } /*********************************************************************//** @@ -1382,7 +1399,7 @@ *************************************************************************/ void setFPGAD17CondReadEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD17D74Control ) |= FPGA_D17_RD_ENABLE_BIT; + SET_FPGA_ACTUATOR_BITS( fpgaConSensD17D74Control, FPGA_D17_RD_ENABLE_BIT ); } /*********************************************************************//** @@ -1396,7 +1413,7 @@ *************************************************************************/ void clearFPGAD17CondReadEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD17D74Control ) &= ~FPGA_D17_RD_ENABLE_BIT; + CLEAR_FPGA_ACTUATOR_BITS( fpgaConSensD17D74Control, ~FPGA_D17_RD_ENABLE_BIT ); } /*********************************************************************//** @@ -1410,7 +1427,7 @@ *************************************************************************/ void setFPGAD27CondReset( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD27D29Control ) |= FPGA_D27_RESET_BIT; + SET_FPGA_ACTUATOR_BITS( fpgaConSensD27D29Control, FPGA_D27_RESET_BIT ); } /*********************************************************************//** @@ -1424,7 +1441,7 @@ *************************************************************************/ void clearFPGAD27CondReset( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD27D29Control ) &= ~FPGA_D27_RESET_BIT; + CLEAR_FPGA_ACTUATOR_BITS( fpgaConSensD27D29Control, ~FPGA_D27_RESET_BIT ); } /*********************************************************************//** @@ -1438,7 +1455,7 @@ *************************************************************************/ void setFPGAD27CondInitEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD27D29Control ) |= FPGA_D27_INIT_ENABLE_BIT; + SET_FPGA_ACTUATOR_BITS( fpgaConSensD27D29Control, FPGA_D27_INIT_ENABLE_BIT ); } /*********************************************************************//** @@ -1452,7 +1469,7 @@ *************************************************************************/ void clearFPGAD27CondInitEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD27D29Control ) &= ~FPGA_D27_INIT_ENABLE_BIT; + CLEAR_FPGA_ACTUATOR_BITS( fpgaConSensD27D29Control, ~FPGA_D27_INIT_ENABLE_BIT ); } /*********************************************************************//** @@ -1469,7 +1486,7 @@ *************************************************************************/ void setFPGAD27CondWriteEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD27D29Control ) |= FPGA_D27_WR_ENABLE_BIT; + SET_FPGA_ACTUATOR_BITS( fpgaConSensD27D29Control, FPGA_D27_WR_ENABLE_BIT ); } /*********************************************************************//** @@ -1483,7 +1500,7 @@ *************************************************************************/ void clearFPGAD27CondWriteEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD27D29Control ) &= ~FPGA_D27_WR_ENABLE_BIT; + CLEAR_FPGA_ACTUATOR_BITS( fpgaConSensD27D29Control, ~FPGA_D27_WR_ENABLE_BIT ); } /*********************************************************************//** @@ -1500,7 +1517,7 @@ *************************************************************************/ void setFPGAD27CondReadEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD27D29Control ) |= FPGA_D27_RD_ENABLE_BIT; + SET_FPGA_ACTUATOR_BITS( fpgaConSensD27D29Control, FPGA_D27_RD_ENABLE_BIT ); } /*********************************************************************//** @@ -1514,7 +1531,7 @@ *************************************************************************/ void clearFPGAD27CondReadEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD27D29Control ) &= ~FPGA_D27_RD_ENABLE_BIT; + CLEAR_FPGA_ACTUATOR_BITS( fpgaConSensD27D29Control, ~FPGA_D27_RD_ENABLE_BIT ); } /*********************************************************************//** @@ -1528,7 +1545,7 @@ *************************************************************************/ void setFPGAD29CondReset( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD27D29Control ) |= FPGA_D29_RESET_BIT; + SET_FPGA_ACTUATOR_BITS( fpgaConSensD27D29Control, FPGA_D29_RESET_BIT ); } /*********************************************************************//** @@ -1542,7 +1559,7 @@ *************************************************************************/ void clearFPGAD29CondReset( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD27D29Control ) &= ~FPGA_D29_RESET_BIT; + CLEAR_FPGA_ACTUATOR_BITS( fpgaConSensD27D29Control, ~FPGA_D29_RESET_BIT ); } /*********************************************************************//** @@ -1556,7 +1573,7 @@ *************************************************************************/ void setFPGAD29CondInitEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD27D29Control ) |= FPGA_D29_INIT_ENABLE_BIT; + SET_FPGA_ACTUATOR_BITS( fpgaConSensD27D29Control, FPGA_D29_INIT_ENABLE_BIT ); } /*********************************************************************//** @@ -1570,7 +1587,7 @@ *************************************************************************/ void clearFPGAD29CondInitEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD27D29Control ) &= ~FPGA_D29_INIT_ENABLE_BIT; + CLEAR_FPGA_ACTUATOR_BITS( fpgaConSensD27D29Control, ~FPGA_D29_INIT_ENABLE_BIT ); } /*********************************************************************//** @@ -1587,7 +1604,7 @@ *************************************************************************/ void setFPGAD29CondWriteEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD27D29Control ) |= FPGA_D29_WR_ENABLE_BIT; + SET_FPGA_ACTUATOR_BITS( fpgaConSensD27D29Control, FPGA_D29_WR_ENABLE_BIT ); } /*********************************************************************//** @@ -1601,7 +1618,7 @@ *************************************************************************/ void clearFPGAD29CondWriteEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD27D29Control ) &= ~FPGA_D29_WR_ENABLE_BIT; + CLEAR_FPGA_ACTUATOR_BITS( fpgaConSensD27D29Control, ~FPGA_D29_WR_ENABLE_BIT ); } /*********************************************************************//** @@ -1618,7 +1635,7 @@ *************************************************************************/ void setFPGAD29CondReadEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD27D29Control ) |= FPGA_D29_RD_ENABLE_BIT; + SET_FPGA_ACTUATOR_BITS( fpgaConSensD27D29Control, FPGA_D29_RD_ENABLE_BIT ); } /*********************************************************************//** @@ -1632,7 +1649,7 @@ *************************************************************************/ void clearFPGAD29CondReadEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD27D29Control ) &= ~FPGA_D29_RD_ENABLE_BIT; + CLEAR_FPGA_ACTUATOR_BITS( fpgaConSensD27D29Control, ~FPGA_D29_RD_ENABLE_BIT ); } /*********************************************************************//** @@ -1646,7 +1663,7 @@ *************************************************************************/ void setFPGAD43CondReset( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD43Control ) |= FPGA_D43_RESET_BIT; + SET_FPGA_ACTUATOR_BITS( fpgaConSensD43Control, FPGA_D43_RESET_BIT ); } /*********************************************************************//** @@ -1660,7 +1677,7 @@ *************************************************************************/ void clearFPGAD43CondReset( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD43Control ) &= ~FPGA_D43_RESET_BIT; + CLEAR_FPGA_ACTUATOR_BITS( fpgaConSensD43Control, ~FPGA_D43_RESET_BIT ); } /*********************************************************************//** @@ -1674,7 +1691,7 @@ *************************************************************************/ void setFPGAD43CondInitEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD43Control ) |= FPGA_D43_INIT_ENABLE_BIT; + SET_FPGA_ACTUATOR_BITS( fpgaConSensD43Control, FPGA_D43_INIT_ENABLE_BIT ); } /*********************************************************************//** @@ -1688,7 +1705,7 @@ *************************************************************************/ void clearFPGAD43CondInitEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD43Control ) &= ~FPGA_D43_INIT_ENABLE_BIT; + CLEAR_FPGA_ACTUATOR_BITS( fpgaConSensD43Control, ~FPGA_D43_INIT_ENABLE_BIT ); } /*********************************************************************//** @@ -1705,7 +1722,7 @@ *************************************************************************/ void setFPGAD43CondWriteEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD43Control ) |= FPGA_D43_WR_ENABLE_BIT; + SET_FPGA_ACTUATOR_BITS( fpgaConSensD43Control, FPGA_D43_WR_ENABLE_BIT ); } /*********************************************************************//** @@ -1719,7 +1736,7 @@ *************************************************************************/ void clearFPGAD43CondWriteEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD43Control ) &= ~FPGA_D43_WR_ENABLE_BIT; + CLEAR_FPGA_ACTUATOR_BITS( fpgaConSensD43Control, ~FPGA_D43_WR_ENABLE_BIT ); } /*********************************************************************//** @@ -1736,7 +1753,7 @@ *************************************************************************/ void setFPGAD43CondReadEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD43Control ) |= FPGA_D43_RD_ENABLE_BIT; + SET_FPGA_ACTUATOR_BITS( fpgaConSensD43Control, FPGA_D43_RD_ENABLE_BIT ); } /*********************************************************************//** @@ -1750,7 +1767,7 @@ *************************************************************************/ void clearFPGAD43CondReadEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD43Control ) &= ~FPGA_D43_RD_ENABLE_BIT; + CLEAR_FPGA_ACTUATOR_BITS( fpgaConSensD43Control, ~FPGA_D43_RD_ENABLE_BIT ); } /*********************************************************************//** @@ -1764,7 +1781,7 @@ *************************************************************************/ void setFPGAD74CondReset( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD17D74Control ) |= FPGA_D74_RESET_BIT; + SET_FPGA_ACTUATOR_BITS( fpgaConSensD17D74Control, FPGA_D74_RESET_BIT ); } /*********************************************************************//** @@ -1778,7 +1795,7 @@ *************************************************************************/ void clearFPGAD74CondReset( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD17D74Control ) &= ~FPGA_D74_RESET_BIT; + CLEAR_FPGA_ACTUATOR_BITS( fpgaConSensD17D74Control, ~FPGA_D74_RESET_BIT ); } /*********************************************************************//** @@ -1792,7 +1809,7 @@ *************************************************************************/ void setFPGAD74CondInitEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD17D74Control ) |= FPGA_D74_INIT_ENABLE_BIT; + SET_FPGA_ACTUATOR_BITS( fpgaConSensD17D74Control, FPGA_D74_INIT_ENABLE_BIT ); } /*********************************************************************//** @@ -1806,7 +1823,7 @@ *************************************************************************/ void clearFPGAD74CondInitEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD17D74Control ) &= ~FPGA_D74_INIT_ENABLE_BIT; + CLEAR_FPGA_ACTUATOR_BITS( fpgaConSensD17D74Control, ~FPGA_D74_INIT_ENABLE_BIT ); } /*********************************************************************//** @@ -1823,7 +1840,7 @@ *************************************************************************/ void setFPGAD74CondWriteEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD17D74Control ) |= FPGA_D74_WR_ENABLE_BIT; + SET_FPGA_ACTUATOR_BITS( fpgaConSensD17D74Control, FPGA_D74_WR_ENABLE_BIT ); } /*********************************************************************//** @@ -1837,7 +1854,7 @@ *************************************************************************/ void clearFPGAD74CondWriteEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD17D74Control ) &= ~FPGA_D74_WR_ENABLE_BIT; + CLEAR_FPGA_ACTUATOR_BITS( fpgaConSensD17D74Control, ~FPGA_D74_WR_ENABLE_BIT ); } /*********************************************************************//** @@ -1854,7 +1871,7 @@ *************************************************************************/ void setFPGAD74CondReadEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD17D74Control ) |= FPGA_D74_RD_ENABLE_BIT; + SET_FPGA_ACTUATOR_BITS( fpgaConSensD17D74Control, FPGA_D74_RD_ENABLE_BIT ); } /*********************************************************************//** @@ -1868,7 +1885,7 @@ *************************************************************************/ void clearFPGAD74CondReadEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( fpgaConSensD17D74Control ) &= ~FPGA_D74_RD_ENABLE_BIT; + CLEAR_FPGA_ACTUATOR_BITS( fpgaConSensD17D74Control, ~FPGA_D74_RD_ENABLE_BIT ); } @@ -2102,11 +2119,11 @@ { if ( TRUE == flag) { - SET_FPGA_ACTUATOR_FIELD( fpgaGPIOControl ) |= FPGA_D5_HEATER_CNTRL_BIT; + SET_FPGA_ACTUATOR_BITS( fpgaGPIOControl, FPGA_D5_HEATER_CNTRL_BIT ); } else { - SET_FPGA_ACTUATOR_FIELD( fpgaGPIOControl ) &= ~FPGA_D5_HEATER_CNTRL_BIT; + CLEAR_FPGA_ACTUATOR_BITS( fpgaGPIOControl, ~FPGA_D5_HEATER_CNTRL_BIT ); } } @@ -2123,11 +2140,11 @@ { if ( TRUE == enable) { - SET_FPGA_ACTUATOR_FIELD( fpgaGPIOControl ) |= FPGA_D5_HEATER_PWM_ENABLE_BIT; + SET_FPGA_ACTUATOR_BITS( fpgaGPIOControl, FPGA_D5_HEATER_PWM_ENABLE_BIT ); } else { - SET_FPGA_ACTUATOR_FIELD( fpgaGPIOControl ) &= ~FPGA_D5_HEATER_PWM_ENABLE_BIT; + CLEAR_FPGA_ACTUATOR_BITS( fpgaGPIOControl, ~FPGA_D5_HEATER_PWM_ENABLE_BIT ); } } @@ -2219,7 +2236,7 @@ * The getFPGAD48PumpSpeed function gets the spent dialysate * pump speed. * @details \b Inputs: none - * @details \b Outputs: fpgaSensorReadings.fpgaD48MeasuredSpeed + * @details \b Outputs: fpgaD48MeasuredSpeed * @return Spent dialysate pump measured speed. *************************************************************************/ U16 getFPGAD48PumpSpeed( void ) @@ -2232,7 +2249,7 @@ * The getFPGAD12PumpSpeed function gets the fresh dialysate * pump speed. * @details \b Inputs: none - * @details \b Outputs: fpgaSensorReadings.fpgaD12MeasuredSpeed + * @details \b Outputs: fpgaD12MeasuredSpeed * @return fresh dialysate pump measured speed. *************************************************************************/ U16 getFPGAD12PumpSpeed( void ) @@ -2248,12 +2265,12 @@ * bit 1 : spent dialysate pump error (1), no error(0) * bit 0 : fresh dialysate pump error (1), no error(0) * @details \b Inputs: none - * @details \b Outputs: fpgaSensorReadings.fpgaD12D48PumpStatus + * @details \b Outputs: fpgaD12D48PumpStatus * @return fresh dialysate pump error status. *************************************************************************/ BOOL getFPGAD12PumpErrorStatus( void ) { - U08 mask = fpgaSensorReadings.fpgaD12D48PumpStatus & FPGA_D12_PUMP_ERROR_BIT; + U08 mask = ( GET_FPGA_SENSOR_FIELD( fpgaD12D48PumpStatus ) & FPGA_D12_PUMP_ERROR_BIT ); BOOL result = ( mask > 0 ? TRUE : FALSE ); return result; @@ -2267,12 +2284,12 @@ * bit 1 : spent dialysate pump error (1), no error(0) * bit 0 : fresh dialysate pump error (1), no error(0) * @details \b Inputs: none - * @details \b Outputs: fpgaSensorReadings.fpgaD12D48PumpStatus + * @details \b Outputs: fpgaD12D48PumpStatus * @return spent dialysate pump error status. *************************************************************************/ BOOL getFPGAD48PumpErrorStatus( void ) { - U08 mask = fpgaSensorReadings.fpgaD12D48PumpStatus & FPGA_D48_PUMP_ERROR_BIT; + U08 mask = ( GET_FPGA_SENSOR_FIELD( fpgaD12D48PumpStatus ) & FPGA_D48_PUMP_ERROR_BIT ); BOOL result = ( mask > 0 ? TRUE : FALSE ); return result; @@ -2283,7 +2300,7 @@ * The getFPGAD12PumpCurrentFeedback function gets the fresh dialysate * pump current consumption. * @details \b Inputs: none - * @details \b Outputs: fpgaSensorReadings.fpgaD12CurrentFeedback + * @details \b Outputs: fpgaD12CurrentFeedback * @return fresh dialysate pump measured current. *************************************************************************/ U16 getFPGAD12PumpCurrentFeedback( void ) @@ -2296,7 +2313,7 @@ * The getFPGAD48PumpCurrentFeedback function gets the spent dialysate * pump current consumption. * @details \b Inputs: none - * @details \b Outputs: fpgaSensorReadings.fpgaD48CurrentFeedback + * @details \b Outputs: fpgaD48CurrentFeedback * @return spent dialysate pump measured current. *************************************************************************/ U16 getFPGAD48PumpCurrentFeedback( void ) @@ -2309,7 +2326,7 @@ * The getFPGAD12PumpHallDirectionStatus function gets the fresh dialysate * pump hall sensor based direction error status. * @details \b Inputs: none - * @details \b Outputs: fpgaSensorReadings.fpgaD12HallStatus + * @details \b Outputs: fpgaD12HallStatus * @return fresh dialysate pump hall sensor based direction status. *************************************************************************/ U08 getFPGAD12PumpHallDirectionStatus( void ) @@ -2322,7 +2339,7 @@ * The getFPGAD48PumpHallDirectionStatus function gets the spent dialysate * pump hall sensor based direction error status. * @details \b Inputs: none - * @details \b Outputs: fpgaSensorReadings.fpgaD48HallStatus + * @details \b Outputs: fpgaD48HallStatus * @return spent dialysate pump hall sensor based direction status. *************************************************************************/ U08 getFPGAD48PumpHallDirectionStatus( void ) @@ -2391,26 +2408,26 @@ * @brief * The getFPGAUFPumpFault function gets UF pumps fault * reported by FGPA. - * @details \b Inputs: fpgaSensorReadings.fpgaD76PumpFault + * @details \b Inputs: fpgaD76PumpFault * @details \b Outputs: none * @return Latest UF pumps fault value *************************************************************************/ U08 getFPGAUFPumpFault( void ) { - return ( ( fpgaSensorReadings.fpgaD76PumpFault & FPGA_UF_PUMP_FAULT_BIT ) << UF_PUMP_FAULT_SHIFT ); + return ( ( GET_FPGA_SENSOR_FIELD( fpgaD76PumpFault ) & FPGA_UF_PUMP_FAULT_BIT ) << UF_PUMP_FAULT_SHIFT ); } /*********************************************************************//** * @brief * The getFPGAD76PumpIsParked function gets whether the UF pump is currently * parked. - * @details \b Inputs: fpgaSensorReadings.fpgaD76PumpFault + * @details \b Inputs: fpgaD76PumpFault * @details \b Outputs: none * @return TRUE if UF pump is parked, FALSE if not *************************************************************************/ BOOL getFPGAD76PumpIsParked( void ) { - U08 mask = fpgaSensorReadings.fpgaD76PumpFault & FPGA_UF_PUMP_PARKED_BIT; + U08 mask = ( GET_FPGA_SENSOR_FIELD( fpgaD76PumpFault ) & FPGA_UF_PUMP_PARKED_BIT ); BOOL result = ( mask > 0 ? TRUE : FALSE ); return result; @@ -2420,13 +2437,13 @@ * @brief * The getFPGAD76PumpParkFault function gets whether the UF pump park command * has faulted. - * @details \b Inputs: fpgaSensorReadings.fpgaD76PumpFault + * @details \b Inputs: fpgaD76PumpFault * @details \b Outputs: none * @return TRUE if UF pump park command faulted, FALSE if not *************************************************************************/ BOOL getFPGAD76PumpParkFault( void ) { - U08 mask = fpgaSensorReadings.fpgaD76PumpFault & FPGA_UF_PUMP_PARK_FAULT_BIT; + U08 mask = ( GET_FPGA_SENSOR_FIELD ( fpgaD76PumpFault ) & FPGA_UF_PUMP_PARK_FAULT_BIT ); BOOL result = ( mask > 0 ? TRUE : FALSE ); return result; @@ -2436,7 +2453,7 @@ * @brief * The getFPGAConcentratePumpsFault function gets concentrate pumps fault * reported by FGPA. - * @details \b Inputs: fpgaSensorReadings.fpgaD11_D10_PumpFault + * @details \b Inputs: fpgaD11_D10_PumpFault * @details \b Outputs: none * @return Latest concentrate pumps fault value *************************************************************************/ @@ -2449,13 +2466,13 @@ * @brief * The getFPGAD11PumpIsParked function gets whether the acid pump is currently * parked. - * @details \b Inputs: fpgaSensorReadings.fpgaD11_D10_PumpFault + * @details \b Inputs: fpgaD11_D10_PumpFault * @details \b Outputs: none * @return TRUE if acid pump is parked, FALSE if not *************************************************************************/ BOOL getFPGAD11PumpIsParked( void ) { - U08 mask = fpgaSensorReadings.fpgaD11_D10_PumpFault & FPGA_D11_PUMP_PARKED_BIT; + U08 mask = ( GET_FPGA_SENSOR_FIELD( fpgaD11_D10_PumpFault ) & FPGA_D11_PUMP_PARKED_BIT ); BOOL result = ( mask > 0 ? TRUE : FALSE ); return result; @@ -2465,13 +2482,13 @@ * @brief * The getFPGAD10PumpIsParked function gets whether the bicarb pump is currently * parked. - * @details \b Inputs: fpgaSensorReadings.fpgaD11_D10_PumpFault + * @details \b Inputs: fpgaD11_D10_PumpFault * @details \b Outputs: none * @return TRUE if bicarb pump is parked, FALSE if not *************************************************************************/ BOOL getFPGAD10PumpIsParked( void ) { - U08 mask = fpgaSensorReadings.fpgaD11_D10_PumpFault & FPGA_D10_PUMP_PARKED_BIT; + U08 mask = ( GET_FPGA_SENSOR_FIELD( fpgaD11_D10_PumpFault ) & FPGA_D10_PUMP_PARKED_BIT ); BOOL result = ( mask > 0 ? TRUE : FALSE ); return result; @@ -2481,13 +2498,13 @@ * @brief * The getFPGAD11PumpParkFault function gets whether the acid pump park command * has faulted. - * @details \b Inputs: fpgaSensorReadings.fpgaD11_D10_PumpFault + * @details \b Inputs: fpgaD11_D10_PumpFault * @details \b Outputs: none * @return TRUE if acid pump park command faulted, FALSE if not *************************************************************************/ BOOL getFPGAD11PumpParkFault( void ) { - U08 mask = fpgaSensorReadings.fpgaD11_D10_PumpFault & FPGA_D11_PUMP_PARK_FAULT_BIT; + U08 mask = ( GET_FPGA_SENSOR_FIELD( fpgaD11_D10_PumpFault ) & FPGA_D11_PUMP_PARK_FAULT_BIT ); BOOL result = ( mask > 0 ? TRUE : FALSE ); return result; @@ -2497,13 +2514,13 @@ * @brief * The getFPGAD10PumpParkFault function gets whether the bicarb pump park command * has faulted. - * @details \b Inputs: fpgaSensorReadings.fpgaD11_D10_PumpFault + * @details \b Inputs: fpgaD11_D10_PumpFault * @details \b Outputs: none * @return TRUE if bicarb pump park command faulted, FALSE if not *************************************************************************/ BOOL getFPGAD10PumpParkFault( void ) { - U08 mask = fpgaSensorReadings.fpgaD11_D10_PumpFault & FPGA_D10_PUMP_PARK_FAULT_BIT; + U08 mask = ( GET_FPGA_SENSOR_FIELD( fpgaD11_D10_PumpFault ) & FPGA_D10_PUMP_PARK_FAULT_BIT ); BOOL result = ( mask > 0 ? TRUE : FALSE ); return result; @@ -2513,7 +2530,7 @@ * @brief * The getFPGAD11PumpHallSensePulseWidth function gets concentrate pump D11_Pump * hall sense pulse width. - * @details \b Inputs: fpgaSensorReadings.fpgaD11PumpHallSense + * @details \b Inputs: fpgaD11PumpHallSense * @details \b Outputs: none * @return concentrate pump D11_Pump hall sense pulse width *************************************************************************/ @@ -2526,7 +2543,7 @@ * @brief * The getFPGAD10PumpHallSensePulseWidth function gets concentrate pump D10_Pump * hall sense pulse width. - * @details \b Inputs: fpgaSensorReadings.fpgaD10PumpHallSense + * @details \b Inputs: fpgaD10PumpHallSense * @details \b Outputs: none * @return concentrate pump D10_Pump hall sense pulse width *************************************************************************/ @@ -2539,7 +2556,7 @@ * @brief * The getFPGAD76PumpHallSensePulseWidth function gets UF pump D76_Pump * hall sense pulse width. - * @details \b Inputs: fpgaSensorReadings.fpgaD76PumpHallSense + * @details \b Inputs: fpgaD76PumpHallSense * @details \b Outputs: none * @return ultrafiltration pump D76_Pump hall sense pulse width *************************************************************************/ @@ -2552,7 +2569,7 @@ * @brief * The getFPGADDValveStates function gets the latest sensed valve states. * See setFPGADDValveStates for valve state bit positions. - * @details \b Inputs: fpgaSensorReadings.fpgaValveStates + * @details \b Inputs: fpgaValveStates * @details \b Outputs: none * @return last valve states reading *************************************************************************/ @@ -2566,7 +2583,7 @@ * The getFPGAValveBCStates function gets the latest sensed balancing * chamber valve states. * See setFPGABCValveStates for BC valve state bit positions. - * @details \b Inputs: fpgaSensorReadings.fpgaValveBCStates + * @details \b Inputs: fpgaValveBCStates * @details \b Outputs: none * @return last balancing chamber valve states reading *************************************************************************/ @@ -2580,7 +2597,7 @@ * The getFPGAValveSpStates function gets the latest sensed spare * valve states. * See setFPGAUFValveStates for Spare valve state bit positions. - * @details \b Inputs: fpgaSensorReadings.fpgaValveSpStates + * @details \b Inputs: fpgaValveSpStates * @details \b Outputs: none * @return last spare valve states reading *************************************************************************/ @@ -2593,7 +2610,7 @@ * @brief * The getFPGAD9PresRawPressure function gets hydraulics outlet pressure sensor raw * pressure value. - * @details \b Inputs: fpgaSensorReadings.fpgaD9PresPressure + * @details \b Inputs: fpgaD9PresPressure * @details \b Outputs: none * @return Latest hydraulics outlet pressure sensor raw pressure data *************************************************************************/ @@ -2606,7 +2623,7 @@ * @brief * The getFPGAD9PresRawTemperature function gets hydraulics outlet pressure sensor raw * temperature value. - * @details \b Inputs: fpgaSensorReadings.fpgaD9PresTemp + * @details \b Inputs: fpgaD9PresTemp * @details \b Outputs: none * @return Latest hydraulics outlet pressure sensor raw temperature data *************************************************************************/ @@ -2619,7 +2636,7 @@ * @brief * The getFPGAD66PresRawPressure function gets Bibag pressure sensor raw * pressure value. - * @details \b Inputs: fpgaSensorReadings.fpgaD66PresPressure + * @details \b Inputs: fpgaD66PresPressure * @details \b Outputs: none * @return Latest Bibag pressure sensor raw pressure data *************************************************************************/ @@ -2632,7 +2649,7 @@ * @brief * The getFPGAD66PresRawTemperature function gets Bibag pressure sensor raw * temperature value. - * @details \b Inputs: fpgaSensorReadings.fpgaD66PresTemp + * @details \b Inputs: fpgaD66PresTemp * @details \b Outputs: none * @return Latest Bibag pressure sensor raw temperature data *************************************************************************/ @@ -2645,7 +2662,7 @@ * @brief * The getFPGAD51PresRawPressure function gets spent dialysate pressure sensor raw * pressure value. - * @details \b Inputs: fpgaSensorReadings.fpgaD51PresPressure + * @details \b Inputs: fpgaD51PresPressure * @details \b Outputs: none * @return Latest spent dialysate pressure sensor raw pressure data *************************************************************************/ @@ -2658,7 +2675,7 @@ * @brief * The getFPGAD51PresRawTemperature function gets spent dialysate pressure sensor raw * temperature value. - * @details \b Inputs: fpgaSensorReadings.fpgaD51PresTemp + * @details \b Inputs: fpgaD51PresTemp * @details \b Outputs: none * @return Latest spent dialysate pressure sensor raw temperature data *************************************************************************/ @@ -2671,7 +2688,7 @@ * @brief * The getFPGAD18PresRawPressure function gets fresh dialysate pressure sensor raw * pressure value. - * @details \b Inputs: fpgaSensorReadings.fpgaD18PresPressure + * @details \b Inputs: fpgaD18PresPressure * @details \b Outputs: none * @return Latest fresh dialysate pressure sensor raw pressure data *************************************************************************/ @@ -2684,7 +2701,7 @@ * @brief * The getFPGAD18PresRawTemperature function gets fresh dialysate pressure sensor raw * temperature value. - * @details \b Inputs: fpgaSensorReadings.fpgaD18PresTemp + * @details \b Inputs: fpgaD18PresTemp * @details \b Outputs: none * @return Latest fresh dialysate pressure sensor raw temperature data *************************************************************************/ @@ -2697,7 +2714,7 @@ * @brief * The getFPGAD41PresRawPressure function gets transmembrane pressure sensor raw * pressure value. - * @details \b Inputs: fpgaSensorReadings.fpgaD41PresPressure + * @details \b Inputs: fpgaD41PresPressure * @details \b Outputs: none * @return Latest transmembrane pressure sensor raw pressure data *************************************************************************/ @@ -2710,7 +2727,7 @@ * @brief * The getFPGAD41PresRawTemperature function gets transmembrane pressure sensor raw * temperature value. - * @details \b Inputs: fpgaSensorReadings.fpgaD41PresTemp + * @details \b Inputs: fpgaD41PresTemp * @details \b Outputs: none * @return Latest transmembrane pressure sensor raw temperature data *************************************************************************/ @@ -2723,7 +2740,7 @@ * @brief * The getFPGAD87PresRawPressure function gets fresh dialysate post ultrafilter * pressure sensor raw pressure value. - * @details \b Inputs: fpgaSensorReadings.fpgaD87PresPressure + * @details \b Inputs: fpgaD87PresPressure * @details \b Outputs: none * @return Fresh dialysate post ultrafilter pressure sensor raw pressure data *************************************************************************/ @@ -2736,7 +2753,7 @@ * @brief * The getFPGAD87PresRawTemperature function gets fresh dialysate post ultrafilter * pressure sensor raw temperature value. - * @details \b Inputs: fpgaSensorReadings.fpgaD87PresTemp + * @details \b Inputs: fpgaD87PresTemp * @details \b Outputs: none * @return Fresh dialysate post ultrafilter pressure sensor raw temperature data *************************************************************************/ @@ -2748,7 +2765,7 @@ /*********************************************************************//** * @brief * The getFPGACD1ReadCount function gets D17 conductivity sensor read count. - * @details \b Inputs: fpgaSensorReadings.fpgaD17CondReadCnt + * @details \b Inputs: fpgaD17CondReadCnt * @details \b Outputs: none * @return Latest D17 conductivity sensor read count *************************************************************************/ @@ -2760,7 +2777,7 @@ /*********************************************************************//** * @brief * The getFPGAD17CondErrorCount function gets D17 conductivity sensor error count. - * @details \b Inputs: fpgaSensorReadings.fpgaD17CondErrorCnt + * @details \b Inputs: fpgaD17CondErrorCnt * @details \b Outputs: none * @return Latest D17 conductivity sensor read error count *************************************************************************/ @@ -2772,7 +2789,7 @@ /*********************************************************************//** * @brief * The getFPGAD17Cond function gets D17 conductivity sensor value. - * @details \b Inputs: fpgaSensorReadings.fpgaCD1 + * @details \b Inputs: fpgaCD1 * @details \b Outputs: none * @return Latest D17 conductivity sensor value *************************************************************************/ @@ -2784,7 +2801,7 @@ /*********************************************************************//** * @brief * The getFPGAD17CondTemp function gets D17 conductivity sensor temperature value. - * @details \b Inputs: fpgaSensorReadings.fpgaCD1Temp + * @details \b Inputs: fpgaCD1Temp * @details \b Outputs: none * @return Latest D17 conductivity sensor temperature value *************************************************************************/ @@ -2796,7 +2813,7 @@ /*********************************************************************//** * @brief * The getFPGAD17CondData function gets D17 conductivity sensor register value. - * @details \b Inputs: fpgaSensorReadings.fpgaD17CondDataOut + * @details \b Inputs: fpgaD17CondDataOut * @details \b Outputs: none * @return Latest D17 conductivity sensor register data value *************************************************************************/ @@ -2808,7 +2825,7 @@ /*********************************************************************//** * @brief * The getFPGAD27CondReadCount function gets D27 conductivity sensor read count. - * @details \b Inputs: fpgaSensorReadings.fpgaD27CondReadCnt + * @details \b Inputs: fpgaD27CondReadCnt * @details \b Outputs: none * @return Latest D27 conductivity sensor read count *************************************************************************/ @@ -2820,7 +2837,7 @@ /*********************************************************************//** * @brief * The getFPGAD27CondErrorCount function gets D27 conductivity sensor error count. - * @details \b Inputs: fpgaSensorReadings.fpgaD27CondErrorCnt + * @details \b Inputs: fpgaD27CondErrorCnt * @details \b Outputs: none * @return Latest D27 conductivity sensor read error count *************************************************************************/ @@ -2832,7 +2849,7 @@ /*********************************************************************//** * @brief * The getFPGAD27Cond function gets D27 conductivity sensor value. - * @details \b Inputs: fpgaSensorReadings.fpgaD27Cond + * @details \b Inputs: fpgaD27Cond * @details \b Outputs: none * @return Latest D27 conductivity sensor value *************************************************************************/ @@ -2844,7 +2861,7 @@ /*********************************************************************//** * @brief * The getFPGAD27CondTemp function gets D27 conductivity sensor temperature value. - * @details \b Inputs: fpgaSensorReadings.fpgaD27CondTemp + * @details \b Inputs: fpgaD27CondTemp * @details \b Outputs: none * @return Latest D27 conductivity sensor temperature value *************************************************************************/ @@ -2856,7 +2873,7 @@ /*********************************************************************//** * @brief * The getFPGAD27CondData function gets D27 conductivity sensor register value. - * @details \b Inputs: fpgaSensorReadings.fpgaD27CondDataOut + * @details \b Inputs: fpgaD27CondDataOut * @details \b Outputs: none * @return Latest D27 conductivity sensor register data value *************************************************************************/ @@ -2868,7 +2885,7 @@ /*********************************************************************//** * @brief * The getFPGAD29CondReadCount function gets D29 conductivity sensor read count. - * @details \b Inputs: fpgaSensorReadings.fpgaD29CondReadCnt + * @details \b Inputs: fpgaD29CondReadCnt * @details \b Outputs: none * @return Latest D29 conductivity sensor read count *************************************************************************/ @@ -2880,7 +2897,7 @@ /*********************************************************************//** * @brief * The getFPGAD29CondErrorCount function gets D29 conductivity sensor error count. - * @details \b Inputs: fpgaSensorReadings.fpgaD29CondErrorCnt + * @details \b Inputs: fpgaD29CondErrorCnt * @details \b Outputs: none * @return Latest D29 conductivity sensor read error count *************************************************************************/ @@ -2892,7 +2909,7 @@ /*********************************************************************//** * @brief * The getFPGAD29Cond function gets D29 conductivity sensor value. - * @details \b Inputs: fpgaSensorReadings.fpgaD29Cond + * @details \b Inputs: fpgaD29Cond * @details \b Outputs: none * @return Latest D29 conductivity sensor value *************************************************************************/ @@ -2904,7 +2921,7 @@ /*********************************************************************//** * @brief * The getFPGAD29CondTemp function gets D29 conductivity sensor temperature value. - * @details \b Inputs: fpgaSensorReadings.fpgaD29CondTemp + * @details \b Inputs: fpgaD29CondTemp * @details \b Outputs: none * @return Latest D29 conductivity sensor temperature value *************************************************************************/ @@ -2916,7 +2933,7 @@ /*********************************************************************//** * @brief * The getFPGAD29CondData function gets D29 conductivity sensor register value. - * @details \b Inputs: fpgaSensorReadings.fpgaD29CondDataOut + * @details \b Inputs: fpgaD29CondDataOut * @details \b Outputs: none * @return Latest D29 conductivity sensor register data value *************************************************************************/ @@ -2928,7 +2945,7 @@ /*********************************************************************//** * @brief * The getFPGAD43CondReadCount function gets D43 conductivity sensor read count. - * @details \b Inputs: fpgaSensorReadings.fpgaD43CondReadCnt + * @details \b Inputs: fpgaD43CondReadCnt * @details \b Outputs: none * @return Latest D43 conductivity sensor read count *************************************************************************/ @@ -2940,7 +2957,7 @@ /*********************************************************************//** * @brief * The getFPGAD43CondErrorCount function gets D43 conductivity sensor error count. - * @details \b Inputs: fpgaSensorReadings.fpgaD43CondErrorCnt + * @details \b Inputs: fpgaD43CondErrorCnt * @details \b Outputs: none * @return Latest D43 conductivity sensor read error count *************************************************************************/ @@ -2952,7 +2969,7 @@ /*********************************************************************//** * @brief * The getFPGAD43Cond function gets D43 conductivity sensor value. - * @details \b Inputs: fpgaSensorReadings.fpgaD43Cond + * @details \b Inputs: fpgaD43Cond * @details \b Outputs: none * @return Latest D43 conductivity sensor value *************************************************************************/ @@ -2964,7 +2981,7 @@ /*********************************************************************//** * @brief * The getFPGAD43CondTemp function gets D43 conductivity sensor temperature value. - * @details \b Inputs: fpgaSensorReadings.fpgaD43CondTemp + * @details \b Inputs: fpgaD43CondTemp * @details \b Outputs: none * @return Latest D43 conductivity sensor temperature value *************************************************************************/ @@ -2976,7 +2993,7 @@ /*********************************************************************//** * @brief * The getFPGAD43CondData function gets D43 conductivity sensor register value. - * @details \b Inputs: fpgaSensorReadings.fpgaD43CondDataOut + * @details \b Inputs: fpgaD43CondDataOut * @details \b Outputs: none * @return Latest D43 conductivity sensor register data value *************************************************************************/ @@ -2988,7 +3005,7 @@ /*********************************************************************//** * @brief * The getFPGAD74CondReadCount function gets D74 conductivity sensor read count. - * @details \b Inputs: fpgaSensorReadings.fpgaD74CondReadCnt + * @details \b Inputs: fpgaD74CondReadCnt * @details \b Outputs: none * @return Latest D74 conductivity sensor read count *************************************************************************/ @@ -3000,7 +3017,7 @@ /*********************************************************************//** * @brief * The getFPGAD74CondErrorCount function gets D74 conductivity sensor error count. - * @details \b Inputs: fpgaSensorReadings.fpgaD74CondErrorCnt + * @details \b Inputs: fpgaD74CondErrorCnt * @details \b Outputs: none * @return Latest D74 conductivity sensor read error count *************************************************************************/ @@ -3012,7 +3029,7 @@ /*********************************************************************//** * @brief * The getFPGAD74Cond function gets D74 conductivity sensor value. - * @details \b Inputs: fpgaSensorReadings.fpgaD74Cond + * @details \b Inputs: fpgaD74Cond * @details \b Outputs: none * @return Latest D74 conductivity sensor value *************************************************************************/ @@ -3024,7 +3041,7 @@ /*********************************************************************//** * @brief * The getFPGAD74CondTemp function gets D74 conductivity sensor temperature value. - * @details \b Inputs: fpgaSensorReadings.fpgaD74CondTemp + * @details \b Inputs: fpgaD74CondTemp * @details \b Outputs: none * @return Latest D74 conductivity sensor temperature value *************************************************************************/ @@ -3036,7 +3053,7 @@ /*********************************************************************//** * @brief * The getFPGAD74CondData function gets D74 conductivity sensor register value. - * @details \b Inputs: fpgaSensorReadings.fpgaD74CondDataOut + * @details \b Inputs: fpgaD74CondDataOut * @details \b Outputs: none * @return Latest D74 conductivity sensor register data value *************************************************************************/ @@ -3049,68 +3066,79 @@ * @brief * The getFPGAD63LevelSensor function gets the latest FPGA D63 upper level * sensor reading. - * @details \b Inputs: fpgaSensorReadings.fpgaD63LevelSensor + * @details \b Inputs: fpgaD63LevelSensor * @details \b Outputs: none * @return last FPGA D63 upper level sensor reading *************************************************************************/ U16 getFPGAD63LevelSensor( void ) { +#if 1 if ( getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_2_0_HW ) != TRUE ) { return 0; } else { - return fpgaBeta2SensorReadings.fpgaConductiveLevelStatus; + return fpgaSensorReadings.fpgaConductiveLevelStatus; } +#else + return GET_FPGA_SENSOR_FIELD( fpgaConductiveLevelStatus ); +#endif } /*********************************************************************//** * @brief * The getFPGAD98LevelSensor function gets the latest FPGA D98 lower level * sensor reading. - * @details \b Inputs: fpgaSensorReadings.fpgaD98LevelSensor + * @details \b Inputs: fpgaD98LevelSensor * @details \b Outputs: none * @return last FPGA D98 lower level sensor reading *************************************************************************/ U16 getFPGAD98LevelSensor( void ) { +#if 1 // Remove when Beta 1.9 is obselete if ( getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_2_0_HW ) == TRUE ) { - return fpgaBeta2SensorReadings.fpgaConductiveLevelStatus; + return fpgaSensorReadings.fpgaConductiveLevelStatus; } else { return 0; } +#else + return GET_FPGA_SENSOR_FIELD( fpgaConductiveLevelStatus ); +#endif } /*********************************************************************//** * @brief * The getFPGAD46LevelSensor function gets the latest FPGA level sensor 2 * reading. - * @details \b Inputs: fpgaSensorReadings.fpgaD46LevelSensor + * @details \b Inputs: fpgaD46LevelSensor * @details \b Outputs: none * @return last FPGA level sensor2 reading *************************************************************************/ U16 getFPGAD46LevelSensor( void ) { -// return GET_FPGA_SENSOR_FIELD( fpgaConductiveLevelStatus ); +#if 1 if ( getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_2_0_HW ) == TRUE ) { - return fpgaBeta2SensorReadings.fpgaConductiveLevelStatus; + return fpgaSensorReadings.fpgaConductiveLevelStatus; } else { return 0; } +#else + return GET_FPGA_SENSOR_FIELD( fpgaConductiveLevelStatus ); +#endif } /*********************************************************************//** * @brief * The getFPGAD6LevelStatus function gets the latest FPGA floater D6 level * reading. - * @details \b Inputs: fpgaSensorReadings.fpgaD6FloaterStatus + * @details \b Inputs: fpgaD6FloaterStatus * @details \b Outputs: none * @return last FPGA floater D6 level reading *************************************************************************/ @@ -3123,21 +3151,24 @@ * @brief * The getFPGAFloater2Status function gets the latest FPGA floater 2 level * reading. - * @details \b Inputs: fpgaSensorReadings.fpgaFloater2Status + * @details \b Inputs: fpgaFloater2Status * @details \b Outputs: none * @return last FPGA floater 2 level reading *************************************************************************/ U08 getFPGAFloater2Status( void ) { -// return GET_FPGA_SENSOR_FIELD( fpgaConductiveLevelStatus ); +#if 1 if ( getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_2_0_HW ) == TRUE ) { - return fpgaBeta2SensorReadings.fpgaConductiveLevelStatus; + return fpgaSensorReadings.fpgaConductiveLevelStatus; } else { return 0; } +#else + return GET_FPGA_SENSOR_FIELD( fpgaConductiveLevelStatus ); +#endif } /*********************************************************************//** @@ -3256,7 +3287,7 @@ if ( TRUE == incTimeWindowedCount( TIME_WINDOWED_COUNT_FPGA_COMM_FAILURES ) ) { //TODO : Enable alarm later - //SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_FPGA_COMM_TIMEOUT, MAX_FPGA_COMM_FAILURES, (U32)fpgaSensorReadings.fpgaIOErrorCntProcessor ) + //SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_FPGA_COMM_TIMEOUT, MAX_FPGA_COMM_FAILURES, (U32)GET_FPGA_SENSOR_FIELD( fpgaIOErrorCntProcessor ) ) } } } @@ -3324,7 +3355,7 @@ if ( TRUE == incTimeWindowedCount( TIME_WINDOWED_COUNT_FPGA_COMM_FAILURES ) ) { //TODO : Enable alarm later - //SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_FPGA_COMM_TIMEOUT, MAX_FPGA_COMM_FAILURES, (U32)fpgaSensorReadings.fpgaIOErrorCntProcessor ) + //SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_FPGA_COMM_TIMEOUT, MAX_FPGA_COMM_FAILURES, (U32)GET_FPGA_SENSOR_FIELD( fpgaIOErrorCntProcessor ) ) status = TRUE; } } @@ -3344,7 +3375,7 @@ *************************************************************************/ U08 getFPGABloodLeakStatus( void ) { - U08 selfTestStatus = ( fpgaSensorReadings.fpgaD42PulseStatus & FPGA_D42_BLOOD_LEAK_STATUS_MASK ) >> FPGA_D42_BLOOD_LEAK_ST_BIT_INDEX; + U08 selfTestStatus = ( ( GET_FPGA_SENSOR_FIELD( fpgaD42PulseStatus ) & FPGA_D42_BLOOD_LEAK_STATUS_MASK ) >> FPGA_D42_BLOOD_LEAK_ST_BIT_INDEX ); return selfTestStatus; } @@ -3437,7 +3468,7 @@ *************************************************************************/ void setFPGAD79RinsePumpControl( U08 value ) { - SET_FPGA_ACTUATOR_FIELD( fpgaDDSpareValveControl ) &= value; + CLEAR_FPGA_ACTUATOR_BITS( fpgaDDSpareValveControl, value ); } /*********************************************************************//** @@ -3494,7 +3525,7 @@ * 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.valveFPControlReadback + * @details \b Outputs: valveFPControlReadback * @return none *************************************************************************/ U08 getFPGAFPValveStates( void ) @@ -3526,7 +3557,7 @@ * 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.valveIOControlReadback + * @details \b Outputs: valveIOControlReadback * @return none *************************************************************************/ U08 getFPGAIOValveStates( void ) @@ -3555,7 +3586,7 @@ * an 8-bit mask representing the set of states with a 1 meaning "enabled" * and a 0 meaning "disabled". * @details \b Inputs: none - * @details \b Outputs: fpgaSensorReadings.valveIOPWMEnableReadback + * @details \b Outputs: valveIOPWMEnableReadback * @return none *************************************************************************/ U08 getFPGAValveIOPWMEnable( void ) @@ -3584,7 +3615,7 @@ * an 8-bit mask representing the set of states with a 1 meaning "enabled" * and a 0 meaning "disabled". * @details \b Inputs: none - * @details \b Outputs: fpgaSensorReadings.valveFPPWMEnableReadback + * @details \b Outputs: valveFPPWMEnableReadback * @return none *************************************************************************/ U08 getFPGAValveFPPWMEnable( void ) @@ -3667,7 +3698,7 @@ * @brief * The getFPGAP12PumpPWM function gets a read back from FPGA of RO pump PWM * duty cycle. - * @details \b Inputs: fpgaSensorReadings.roPumpPWMReadback + * @details \b Inputs: roPumpPWMReadback * @details \b Outputs: none * @return measured speed (RPM) of the RO pump *************************************************************************/ @@ -3680,7 +3711,7 @@ * @brief * The getFPGAP12PumpTachCount function gets the running 16-bit tachometer count * from the P12 pump hall sensor. - * @details \b Inputs: fpgaSensorReadings.p12PumpTachCount + * @details \b Inputs: p12PumpTachCount * @details \b Outputs: none * @return P12 pump tachometer count *************************************************************************/ @@ -3721,7 +3752,7 @@ /*********************************************************************//** * @brief * The getFPGAP46RawPressure function gets the P46 pressure reading. - * @details \b Inputs: fpgaSensorReadings.pressureP46 + * @details \b Inputs: pressureP46 * @details \b Outputs: none * @return P46 pressure *************************************************************************/ @@ -3733,7 +3764,7 @@ /*********************************************************************//** * @brief * The getFPGAP46RawTemperature function gets the P46 sensor temperature reading. - * @details \b Inputs: fpgaSensorReadings.temperatureP46 + * @details \b Inputs: temperatureP46 * @details \b Outputs: none * @return P46 sensor temperature *************************************************************************/ @@ -3745,7 +3776,7 @@ /*********************************************************************//** * @brief * The getFPGAM3RawPressure function gets the M3 pressure reading. - * @details \b Inputs: fpgaSensorReadings.pressureM3 + * @details \b Inputs: pressureM3 * @details \b Outputs: none * @return M3 pressure *************************************************************************/ @@ -3757,7 +3788,7 @@ /*********************************************************************//** * @brief * The getFPGAM3RawTemperature function gets the M3 sensor temperature. - * @details \b Inputs: fpgaSensorReadings.temperatureM3 + * @details \b Inputs: temperatureM3 * @details \b Outputs: none * @return M3 sensor temperature *************************************************************************/ @@ -3769,7 +3800,7 @@ /*********************************************************************//** * @brief * The getFPGAP8RawPressure function gets the P8 pressure reading. - * @details \b Inputs: fpgaSensorReadings.pressureP8 + * @details \b Inputs: pressureP8 * @details \b Outputs: none * @return P8 pressure *************************************************************************/ @@ -3781,7 +3812,7 @@ /*********************************************************************//** * @brief * The getFPGAP8RawTemperature function gets the P8 sensor temperature. - * @details \b Inputs: fpgaSensorReadings.temperatureP8 + * @details \b Inputs: temperatureP8 * @details \b Outputs: none * @return P8 sensor temperature *************************************************************************/ @@ -3793,7 +3824,7 @@ /*********************************************************************//** * @brief * The getFPGAP13RawPressure function gets the P13 pressure reading. - * @details \b Inputs: fpgaSensorReadings.pressureP13 + * @details \b Inputs: pressureP13 * @details \b Outputs: none * @return P13 pressure *************************************************************************/ @@ -3805,7 +3836,7 @@ /*********************************************************************//** * @brief * The getFPGAP13RawTemperature function gets the P13 sensor temperature. - * @details \b Inputs: fpgaSensorReadings.temperatureP13 + * @details \b Inputs: temperatureP13 * @details \b Outputs: none * @return P13 sensor temperature *************************************************************************/ @@ -3817,7 +3848,7 @@ /*********************************************************************//** * @brief * The getFPGAP17RawPressure function gets the P17 pressure reading. - * @details \b Inputs: fpgaSensorReadings.pressureP17 + * @details \b Inputs: pressureP17 * @details \b Outputs: none * @return P17 pressure *************************************************************************/ @@ -3829,7 +3860,7 @@ /*********************************************************************//** * @brief * The getFPGAP17RawTemperature function gets the P17 sensor temperature. - * @details \b Inputs: fpgaSensorReadings.temperatureP17 + * @details \b Inputs: temperatureP17 * @details \b Outputs: none * @return P17 sensor temperature *************************************************************************/ @@ -3841,13 +3872,12 @@ /*********************************************************************//** * @brief * The getFPGAP25FloaterState function gets the P25 floater level state. - * @details \b Inputs: fpgaSensorReadings.levelSwitch + * @details \b Inputs: levelSwitch * @details \b Outputs: none * @return P25 floater level state *************************************************************************/ U08 getFPGAP25FloaterState( void ) { -// U08 result = ( fpgaSensorReadings.p25LevelSwitch & FPGA_FLOATER_LEVEL_BIT ); U08 result = ( GET_FPGA_SENSOR_FIELD( p25LevelSwitch ) & FPGA_FLOATER_LEVEL_BIT ); return result; @@ -3856,7 +3886,7 @@ /*********************************************************************//** * @brief * The getFPGAFlowFMP function gets the P16 flow rate (in mL/min). - * @details \b Inputs: fpgaSensorReadings.flowRateP16 + * @details \b Inputs: flowRateP16 * @details \b Outputs: none * @return P16 flow rate (in mL/min) *************************************************************************/ @@ -3869,7 +3899,7 @@ * @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 Inputs: flowTempP16 * @details \b Outputs: none * @return P16 fluid temperature *************************************************************************/ @@ -3882,7 +3912,7 @@ * @brief * The getFPGAFlowP16InternalTemp function gets the P16 flow sensor * internal temperature. - * @details \b Inputs: fpgaSensorReadings.flowIntTempP16 + * @details \b Inputs: flowIntTempP16 * @details \b Outputs: none * @return P16 internal temperature *************************************************************************/ @@ -3894,7 +3924,7 @@ /*********************************************************************//** * @brief * The getFPGAFlowP7 function gets the P7 flow rate (in mL/min). - * @details \b Inputs: fpgaSensorReadings.flowRateP7 + * @details \b Inputs: flowRateP7 * @details \b Outputs: none * @return P7 flow rate (in mL/min) *************************************************************************/ @@ -3907,7 +3937,7 @@ * @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 Inputs: flowTempP7 * @details \b Outputs: none * @return P7 fluid temperature *************************************************************************/ @@ -3920,7 +3950,7 @@ * @brief * The getFPGAFlowP7InternalTemp function gets the P7 flow sensor * internal temperature. - * @details \b Inputs: fpgaSensorReadings.flowIntTempP7 + * @details \b Inputs: flowIntTempP7 * @details \b Outputs: none * @return P7 internal temperature *************************************************************************/ @@ -4032,7 +4062,7 @@ *************************************************************************/ void setFPGAP9Reset( void ) { - SET_FPGA_ACTUATOR_FIELD( conductivityP9Control ) |= FPGA_CONDUCTIVITY_RESET_BIT; + SET_FPGA_ACTUATOR_BITS( conductivityP9Control, FPGA_CONDUCTIVITY_RESET_BIT ); } /*********************************************************************//** @@ -4044,7 +4074,7 @@ *************************************************************************/ void clearFPGAP9Reset( void ) { - SET_FPGA_ACTUATOR_FIELD( conductivityP9Control ) &= ~FPGA_CONDUCTIVITY_RESET_BIT; + CLEAR_FPGA_ACTUATOR_BITS( conductivityP9Control, ~FPGA_CONDUCTIVITY_RESET_BIT ); } /*********************************************************************//** @@ -4057,7 +4087,7 @@ *************************************************************************/ void setFPGAP9InitEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( conductivityP9Control ) |= FPGA_CONDUCTIVITY_INIT_ENABLE_BIT; + SET_FPGA_ACTUATOR_BITS( conductivityP9Control, FPGA_CONDUCTIVITY_INIT_ENABLE_BIT ); } /*********************************************************************//** @@ -4070,7 +4100,7 @@ *************************************************************************/ void clearFPGAP9InitEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( conductivityP9Control ) &= ~FPGA_CONDUCTIVITY_INIT_ENABLE_BIT; + CLEAR_FPGA_ACTUATOR_BITS( conductivityP9Control, ~FPGA_CONDUCTIVITY_INIT_ENABLE_BIT ); } /*********************************************************************//** @@ -4083,7 +4113,7 @@ *************************************************************************/ void setFPGAP9WriteEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( conductivityP9Control ) |= FPGA_CONDUCTIVITY_WR_ENABLE_BIT; + SET_FPGA_ACTUATOR_BITS( conductivityP9Control, FPGA_CONDUCTIVITY_WR_ENABLE_BIT ); } /*********************************************************************//** @@ -4096,7 +4126,7 @@ *************************************************************************/ void clearFPGAP9WriteEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( conductivityP9Control ) &= ~FPGA_CONDUCTIVITY_WR_ENABLE_BIT; + CLEAR_FPGA_ACTUATOR_BITS( conductivityP9Control, ~FPGA_CONDUCTIVITY_WR_ENABLE_BIT ); } /*********************************************************************//** @@ -4109,7 +4139,7 @@ *************************************************************************/ void setFPGAP9ReadEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( conductivityP9Control ) |= FPGA_CONDUCTIVITY_RD_ENABLE_BIT; + SET_FPGA_ACTUATOR_BITS( conductivityP9Control, FPGA_CONDUCTIVITY_RD_ENABLE_BIT ); } /*********************************************************************//** @@ -4122,7 +4152,7 @@ *************************************************************************/ void clearFPGAP9ReadEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( conductivityP9Control ) &= ~FPGA_CONDUCTIVITY_RD_ENABLE_BIT; + CLEAR_FPGA_ACTUATOR_BITS( conductivityP9Control, ~FPGA_CONDUCTIVITY_RD_ENABLE_BIT ); } /*********************************************************************//** @@ -4134,7 +4164,7 @@ *************************************************************************/ void setFPGAP18Reset( void ) { - SET_FPGA_ACTUATOR_FIELD( conductivityP18Control ) |= FPGA_CONDUCTIVITY_RESET_BIT; + SET_FPGA_ACTUATOR_BITS( conductivityP18Control, FPGA_CONDUCTIVITY_RESET_BIT ); } /*********************************************************************//** @@ -4146,7 +4176,7 @@ *************************************************************************/ void clearFPGAP18Reset( void ) { - SET_FPGA_ACTUATOR_FIELD( conductivityP18Control ) &= ~FPGA_CONDUCTIVITY_RESET_BIT; + CLEAR_FPGA_ACTUATOR_BITS( conductivityP18Control, ~FPGA_CONDUCTIVITY_RESET_BIT ); } /*********************************************************************//** @@ -4159,7 +4189,7 @@ *************************************************************************/ void setFPGAP18InitEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( conductivityP18Control ) |= FPGA_CONDUCTIVITY_INIT_ENABLE_BIT; + SET_FPGA_ACTUATOR_BITS( conductivityP18Control, FPGA_CONDUCTIVITY_INIT_ENABLE_BIT ); } /*********************************************************************//** @@ -4172,7 +4202,7 @@ *************************************************************************/ void clearFPGAP18InitEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( conductivityP18Control ) &= ~FPGA_CONDUCTIVITY_INIT_ENABLE_BIT; + CLEAR_FPGA_ACTUATOR_BITS( conductivityP18Control, ~FPGA_CONDUCTIVITY_INIT_ENABLE_BIT ); } /*********************************************************************//** @@ -4185,7 +4215,7 @@ *************************************************************************/ void setFPGAP18WriteEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( conductivityP18Control ) |= FPGA_CONDUCTIVITY_WR_ENABLE_BIT; + SET_FPGA_ACTUATOR_BITS( conductivityP18Control, FPGA_CONDUCTIVITY_WR_ENABLE_BIT ); } /*********************************************************************//** @@ -4198,7 +4228,7 @@ *************************************************************************/ void clearFPGAP18WriteEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( conductivityP18Control ) &= ~FPGA_CONDUCTIVITY_WR_ENABLE_BIT; + CLEAR_FPGA_ACTUATOR_BITS( conductivityP18Control, ~FPGA_CONDUCTIVITY_WR_ENABLE_BIT ); } /*********************************************************************//** @@ -4211,7 +4241,7 @@ *************************************************************************/ void setFPGAP18ReadEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( conductivityP18Control ) |= FPGA_CONDUCTIVITY_RD_ENABLE_BIT; + SET_FPGA_ACTUATOR_BITS( conductivityP18Control, FPGA_CONDUCTIVITY_RD_ENABLE_BIT ); } /*********************************************************************//** @@ -4224,13 +4254,13 @@ *************************************************************************/ void clearFPGAP18ReadEnable( void ) { - SET_FPGA_ACTUATOR_FIELD( conductivityP18Control ) &= ~FPGA_CONDUCTIVITY_RD_ENABLE_BIT; + CLEAR_FPGA_ACTUATOR_BITS( conductivityP18Control, ~FPGA_CONDUCTIVITY_RD_ENABLE_BIT ); } /*********************************************************************//** * @brief * The getFPGAP9ReadCount function gets the latest P9 sensor read count. - * @details \b Inputs: fpgaSensorReadings.conductivityP9ReadCount + * @details \b Inputs: conductivityP9ReadCount * @details \b Outputs: none * @return Current read count for P9 sensor. *************************************************************************/ @@ -4242,7 +4272,7 @@ /*********************************************************************//** * @brief * The getFPGAP9ErrorCount function gets the latest P9 sensor error count. - * @details \b Inputs: fpgaSensorReadings.conductivityP9ErrorCount + * @details \b Inputs: conductivityP9ErrorCount * @details \b Outputs: none * @return Current error count for P9 sensor. *************************************************************************/ @@ -4255,7 +4285,7 @@ * @brief * The getFPGAP9Conductivity function gets the latest P9 sensor conductivity * reading. - * @details \b Inputs: fpgaSensorReadings.conductivityP9Cond + * @details \b Inputs: conductivityP9Cond * @details \b Outputs: none * @return Current conductivity reading from P9 sensor. *************************************************************************/ @@ -4267,7 +4297,7 @@ /*********************************************************************//** * @brief * The getFPGAP9Temperature function gets the latest P9 sensor temperature. - * @details \b Inputs: fpgaSensorReadings.conductivityP9Temp + * @details \b Inputs: conductivityP9Temp * @details \b Outputs: none * @return Current temperature from P9 sensor. *************************************************************************/ @@ -4280,7 +4310,7 @@ * @brief * The getFPGAP9Data function gets the latest P9 sensor data from a read * action. - * @details \b Inputs: fpgaSensorReadings.conductivityP9Data + * @details \b Inputs: conductivityP9Data * @details \b Outputs: none * @return Latest data read from P9 sensor. *************************************************************************/ @@ -4292,7 +4322,7 @@ /*********************************************************************//** * @brief * The getFPGAP18ReadCount function gets the latest P18 sensor read count. - * @details \b Inputs: fpgaSensorReadings.conductivityP18ReadCount + * @details \b Inputs: conductivityP18ReadCount * @details \b Outputs: none * @return Current read count for P18 sensor. *************************************************************************/ @@ -4304,7 +4334,7 @@ /*********************************************************************//** * @brief * The getFPGAP18ErrorCount function gets the latest P18 sensor error count. - * @details \b Inputs: fpgaSensorReadings.conductivityP18ErrorCount + * @details \b Inputs: conductivityP18ErrorCount * @details \b Outputs: none * @return Current error count for P18 sensor. *************************************************************************/ @@ -4317,7 +4347,7 @@ * @brief * The getFPGAP18Conductivity function gets the latest P18 sensor conductivity * reading. - * @details \b Inputs: fpgaSensorReadings.conductivityP18Cond + * @details \b Inputs: conductivityP18Cond * @details \b Outputs: none * @return Current conductivity reading from P18 sensor. *************************************************************************/ @@ -4329,7 +4359,7 @@ /*********************************************************************//** * @brief * The getFPGAP18Temperature function gets the latest P18 sensor temperature. - * @details \b Inputs: fpgaSensorReadings.conductivityP18Temp + * @details \b Inputs: conductivityP18Temp * @details \b Outputs: none * @return Current temperature from P18 sensor. *************************************************************************/ @@ -4342,7 +4372,7 @@ * @brief * The getFPGAP18Data function gets the latest P18 sensor data from a read * action. - * @details \b Inputs: fpgaSensorReadings.conductivityP18Data + * @details \b Inputs: conductivityP18Data * @details \b Outputs: none * @return Latest data read from P18 sensor. *************************************************************************/ @@ -4384,7 +4414,7 @@ * @brief * The getFPGAP12PumpPWM function gets a read back from FPGA of RO pump PWM * duty cycle. - * @details \b Inputs: fpgaSensorReadings.p40PumpPWMReadback + * @details \b Inputs: p40PumpPWMReadback * @details \b Outputs: none * @return measured speed (RPM) of the P40 pump *************************************************************************/ @@ -4397,7 +4427,7 @@ * @brief * The getFPGAP12PumpTachCount function gets the running 16-bit tachometer count * from the P40 pump hall sensor. - * @details \b Inputs: fpgaSensorReadings.p40PumpTachCount + * @details \b Inputs: p40PumpTachCount * @details \b Outputs: none * @return P40 pump tachometer count *************************************************************************/