Index: firmware/App/Services/FPGA.h =================================================================== diff -u -rf7b149d8b8c9ea6ac58e4739101693d251d7a355 -r2346a0cb59957d90fe61cb3bff4ec7ffc3df10a4 --- firmware/App/Services/FPGA.h (.../FPGA.h) (revision f7b149d8b8c9ea6ac58e4739101693d251d7a355) +++ firmware/App/Services/FPGA.h (.../FPGA.h) (revision 2346a0cb59957d90fe61cb3bff4ec7ffc3df10a4) @@ -21,11 +21,18 @@ #include "HDCommon.h" #include "Interrupts.h" + /** * @defgroup FPGA FPGA * @brief FPGA service module. - * Maintains latest sensor readings at priority task interval. Updates actuator - * states at priority task interval. + * The FPGA module manages communication between the HD and the FPGA via UART. + * This module is driven by the Priority Task via calls to two FPGA executive functions: + * 1) an incoming executive manages the states of the state machine that deal with responses and data received from the FPGA + * 2) an outgoing executive manages transmission of write and read commands to the FPGA. + * This module first reads the header record that includes the FPGA ID and revision and + * verifies the FPGA ID to check FPGA communication. It then initializes and configures the ADCs and + * various other sensors that are interfaced via the FPGA. Then, it essentially enters an infinite loop + * where a bulk write command updates actuator set points and a bulk read command retrieves the latest sensor readings. * * @addtogroup FPGA * @{ @@ -69,6 +76,20 @@ U16 getFPGADialInPumpOcclusion( void ); U16 getFPGADialOutPumpOcclusion( void ); +void setFPGASyringePumpControlFlags( U08 bitFlags ); +void setFPGASyringePumpADCandDACControlFlags( U08 bitFlags ); +void setFPGASyringePumpDACOutputLevel( U16 counts ); +void setFPGASyringePumpStepToggleTime( U32 microSeconds ); +U08 getFPGASyringePumpStatus( void ); +U08 getFPGASyringePumpADCReadCounter( void ); +U08 getFPGASyringePumpADCandDACStatus( void ); +U08 getFPGASyringePumpEncoderStatus( void ); +U32 getFPGASyringePumpEncoderPosition( void ); +U16 getFPGASyringePumpADCChannel0( void ); +U16 getFPGASyringePumpADCChannel1( void ); +U16 getFPGASyringePumpADCChannel2( void ); +U16 getFPGASyringePumpADCChannel3( void ); + void getFPGAAccelAxes( S16 *x, S16 *y, S16 *z ); void getFPGAAccelMaxes( S16 *xm, S16*ym, S16*zm ); void getFPGAAccelStatus( U16 *cnt, U16 *accelFPGAFaultReg );