Index: firmware/App/Services/FpgaTD.h =================================================================== diff -u -r37294a71c0b3e3ca67ccb10b85536d124d3ef028 -r87d45fcfcfdfa6d7638834181fd07bed56a3af67 --- firmware/App/Services/FpgaTD.h (.../FpgaTD.h) (revision 37294a71c0b3e3ca67ccb10b85536d124d3ef028) +++ firmware/App/Services/FpgaTD.h (.../FpgaTD.h) (revision 87d45fcfcfdfa6d7638834181fd07bed56a3af67) @@ -33,8 +33,11 @@ // Bit definitions for pinch valve control register #define FPGA_PINCH_VALVES_1_8_STEP 0x07 ///< Bit mask for configuring pinch valve for 1/8 step microstepping. +#define FPGA_PINCH_VALVES_ENABLE_ENCODER 0x00 ///< Bit mask for configuring pinch valve enable encoder. #define FPGA_PINCH_VALVES_RESET_ENCODER 0x08 ///< Bit mask for configuring pinch valve to reset the encoder. +#define FPAG_PINCH_VALVES_ENABLE 0x00 ///< Bit mask for configuring pinch valve to enable. #define FPGA_PINCH_VALVES_DISABLE 0x10 ///< Bit mask for configuring pinch valve to be disabled. +#define FPGA_PINCH_VALVES_RESET 0x00 ///< Bit mask for configuring pinch valve to be in reset. #define FPGA_PINCH_VALVES_NOT_RESET 0x20 ///< Bit mask for configuring pinch valve to not be in reset. #define FPGA_PINCH_VALVES_NOT_SLEEP 0x40 ///< Bit mask for configuring pinch valve to not be in sleep mode. #define FPGA_PINCH_VALVES_NEW_POS_CMD 0x80 ///< Bit mask for configuring pinch valve to accept a new position command. @@ -48,6 +51,19 @@ #define SYRINGE_PUMP_CONTROL_FORWARD_DIR 0x00 ///< Syringe pump control register bit mask for forward direction. #define SYRINGE_PUMP_CONTROL_32TH_STEP 0x03 ///< Syringe pump control register bits for 1/32 micro-stepping mode. +/// Baro sensor manufacturing coefficients +typedef struct +{ + U16 baroManufactInfo; ///< Reg 352. Baro sensor manufacturing information. + U16 baroPresSensitivity; ///< Reg 354. Baro sensor prom coefficient 1. + U16 baroPresOffset; ///< Reg 356. Baro sensor prom coefficient 2. + U16 baroTempCoeffOfPresSense; ///< Reg 358. Baro sensor prom coefficient 3. + U16 baroTempCoeffPresOffset; ///< Reg 360. Baro sensor prom coefficient 4. + U16 baroRefTemp; ///< Reg 362. Baro sensor prom coefficient 5. + U16 baroTempCoeffOfTemp; ///< Reg 364. Baro sensor prom coefficient 6. + U16 baroPromCRC; ///< Reg 366. Baro prom CRC. +} BARO_PRES_SENSOR_MFG_T; + // ********** public function prototypes ********** void initFpgaTD( void ); @@ -70,8 +86,10 @@ void setH4Direction( MOTOR_DIR_T dir ); void setH4SetSpeed( U16 rpm ); U16 getH4Period( void ); +void setH4BrakeAndHoldTorque( void ); S16 getH4RotorCount( void ); +S16 getH4TorqueCount( void ); U08 getH6Status( void ); U08 getH6RotorStatus( void ); @@ -89,6 +107,12 @@ U08 getH14ReadCounter( void ); U08 getH14ErrorCounter( void ); +void getH23MfgCoeffs( BARO_PRES_SENSOR_MFG_T* baroMfgCoeffs ); +U32 getH23Pressure( void ); +U32 getH23Temperature( void ); +U08 getH23ReadCounter( void ); +U08 getH23ErrorCounter( void ); + F32 getFPGABackupAlarmAudioCurrent( void ); void getFPGAAirTrapLevels( BOOL *airAtLower, BOOL *airAtUpper );