Index: firmware/App/Services/FpgaDD.c =================================================================== diff -u -reb40fb713ed387f87aa4d9ed9b9f42f91881064e -r4d6c6df8f990037cb66fbd0efdc4cc5a0ec31558 --- firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision eb40fb713ed387f87aa4d9ed9b9f42f91881064e) +++ firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision 4d6c6df8f990037cb66fbd0efdc4cc5a0ec31558) @@ -230,8 +230,10 @@ U16 p12PumpTachCount; ///< Reg 708. P12 pump tachometer counter. U16 dsPumpTachCount; ///< Reg 710. DSP tachometer counter. U16 flowIntTempP7; ///< Reg 712. P7 flow sensor internal temperature. - U16 valveControlReadback; ///< Reg 714. Valve control bits read back. - U16 valvePWMEnableReadback; ///< Reg 716. Valve PWM enable read back. + U08 valveIOControlReadback; ///< Reg 714. Valve IO control bits read back. + U08 valveFPControlReadback; ///< Reg 715. Valve FP control bits read back. + U08 valveIOPWMEnableReadback; ///< Reg 716. Valve IO PWM enable read back. + U08 valveFPPWMEnableReadback; ///< Reg 717. Valve FP PWM enable read back. U16 p12PumpPWMReadback; ///< Reg 718. P12 pump PWM read back. U16 p40PumpPWMReadback; ///< Reg 720. P40 pump PWM read back. U08 p7flowReadCount; ///< Reg 722. P7 Flow sensor read counter. @@ -304,7 +306,8 @@ U08 fpgaD76PumpControl; ///< Reg 78. UF Pump Control U08 notused; ///< Reg 79. Not used - U16 valveControl; ///< Reg 80. Valve control register. + U08 valveIOControl; ///< Reg 80. Valve IO control register. + U08 valveFPControl; ///< Reg 81. Valve FP control register. U08 conductivityP9Control; ///< Reg 82. P9 conductivity control register. U08 conductivityP18Control; ///< Reg 83. P18 conductivity control register. U16 conductivityP9Address; ///< Reg 84. P9 conductivity address register. @@ -323,7 +326,8 @@ U08 reserved1; ///< Reg 111. Reserved. U08 flowControlp7; ///< Reg 112. P7 AVS Romer flow sensor control register. U08 flowAddressp7; ///< Reg 113. P7 AVS Romer flow sensor I2C slave address register. - U16 valvePWMEnable; ///< Reg 114. Valve PWM enable register. + U08 valveIOPWMEnable; ///< Reg 114. Valve IO PWM enable register. + U08 valveFPPWMEnable; ///< Reg 115. Valve FP PWM enable register. U08 flowControlp16; ///< Reg 116. P16 AVS Romer flow sensor control register. U08 flowAddressp16; ///< Reg 117. P16 AVS Romer flow sensor I2C slave address register. @@ -2812,44 +2816,74 @@ /*********************************************************************//** * @brief - * The setFPGAIOFPValveStates function sets the RO valve states with an 8-bit + * The setFPGAIOValveStates function sets the IO 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 - M4.\n - * 1 - P11.\n - * 2 - P33.\n - * 3 - P34.\n - * 4 - P37.\n - * 5 - P39.\n - * 6 - P43.\n - * 7 - P6.\n - * 15:8 - Not used. \n + * 1 - M12.\n + * 2:7- Not used. \n * @details \b Inputs: none - * @details \b Outputs: fpgaActuatorSetPoints.valveControl + * @details \b Outputs: fpgaActuatorSetPoints.valveIOControl * @param valveStates bit mask for requested valve states * @return none *************************************************************************/ -void setFPGAIOFPValveStates( U16 valveStates ) +void setFPGAIOValveStates( U08 valveStates ) { - fpgaActuatorSetPoints.valveControl = valveStates; + fpgaActuatorSetPoints.valveIOControl = valveStates; } /*********************************************************************//** * @brief - * The getFPGAValveStates function gets the RO valve commanded states with + * The setFPGAFPValveStates function sets the FP 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 - P11.\n + * 1 - P33.\n + * 2 - P34.\n + * 3 - P37.\n + * 4 - P39.\n + * 5 - P6.\n + * 6:7- Not used. \n + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints.valveFPControl + * @param valveStates bit mask for requested valve states + * @return none + *************************************************************************/ +void setFPGAFPValveStates( U08 valveStates ) +{ + fpgaActuatorSetPoints.valveFPControl = valveStates; +} + +/*********************************************************************//** + * @brief + * The getFPGAIOValveStates function gets the IO 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 + * @details \b Outputs: fpgaSensorReadings.valveIOControlReadback * @return none *************************************************************************/ -U16 getFPGAIOFPValveStates( void ) +U08 getFPGAIOValveStates( void ) { - return fpgaSensorReadings.valveControlReadback; + return fpgaSensorReadings.valveIOControlReadback; } /*********************************************************************//** * @brief + * The getFPGAFPValveStates function gets the FP 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.valveFPControlReadback + * @return none + *************************************************************************/ +U08 getFPGAFPValveStates( void ) +{ + return fpgaSensorReadings.valveFPControlReadback; +} + +/*********************************************************************//** + * @brief * The setFPGAP12PumpEnable function enables or disables the P12 pump. * @details \b Inputs: none * @details \b Outputs: fpgaActuatorSetPoints.p12PumpControl