Index: firmware/App/Drivers/ConductivityTeensy.h =================================================================== diff -u -r46a42611591cb92eef5f20c8d39964d406c5c8cc -r6a5f0a5c76ae840ef58e695b5602f9d3bb89f65d --- firmware/App/Drivers/ConductivityTeensy.h (.../ConductivityTeensy.h) (revision 46a42611591cb92eef5f20c8d39964d406c5c8cc) +++ firmware/App/Drivers/ConductivityTeensy.h (.../ConductivityTeensy.h) (revision 6a5f0a5c76ae840ef58e695b5602f9d3bb89f65d) @@ -19,7 +19,8 @@ #define _CONDUCTIVITY_TEENSY_H_ #include "DDCommon.h" -#include "ConductivitySensors.h" +#include "DDDefs.h" + // ********** public definitions ********** #define DOUBLE_COUNT 8 ///< Number of double values in Teensy EEPROM data @@ -58,7 +59,7 @@ /// Enumeration of Initialization status of all the sensors connected to Teensy typedef enum Conductivity_Init_Status { - COND_INIT_STATUS_UNINITIALIZED = 0, ///< The initialization process has not started. + COND_INIT_STATUS_UNINITIALIZED = 0, ///< The initialization process has not started. COND_INIT_STATUS_IN_PROGRESS, ///< The initialization process has started. COND_INIT_STATUS_INITIALIZED, ///< Initialization process completed and all the sensors were initialized successfully. COND_INIT_STATUS_FAILED ///< Initialization process completed but one or more sensor was not initialized properly. @@ -88,7 +89,7 @@ /// Enumeration of update EEPROM status typedef enum Conductivity_Update_Eeprom_Status { - COND_UPDATE_EEPROM_STATUS_UNINITIALIZED = 0, ///< The initialization process has not started. + COND_UPDATE_EEPROM_STATUS_UNINITIALIZED = 0, ///< The initialization process has not started. COND_UPDATE_EEPROMSTATUS_IN_PROGRESS, ///< The initialization process has started. COND_UPDATE_EEPROM_STATUS_INITIALIZED, ///< Initialization process completed and all the sensors were initialized successfully. COND_UPDATE_EEPROM_STATUS_FAILED ///< Initialization process completed but one or more sensor was not initialized properly. @@ -108,7 +109,7 @@ /// Enumeration of Conductivity models typedef enum Conductivity_Models { - STANDARD, ///< standard equation for conductivity + STANDARD, ///< Standard equation for conductivity ALY_LINEAR, ///< Aly's high range model for conductivity UPDATED_STANDARD, ///< Updated stand equation with a linear transformation. NUM_OF_MODELS, ///< Number of models used for conductivity calculation. @@ -170,7 +171,7 @@ F32 SinFreq; ///< SinFreq : Frequency of excitation signal F32 DacVoltPP; ///< DacVoltPP : DAC output voltage in mV peak to peak. Maximum value is 800mVpp. Peak to peak voltage F32 BiasVolt; ///< BiasVolt : The excitation signal is DC+AC. This parameter decides the DC value in mV unit. 0.0mV means no DC bias. - U32 HstiaRtiaSel; ///< HstiaRtiaSel : Valid param values ( 0, 1, 2, 3, 4, 5, 6, 7 ) + U32 HstiaRtiaSel; ///< HstiaRtiaSel : TIA (Transimpedance Amplifier) feedback resistor value. Valid param values ( 0, 1, 2, 3, 4, 5, 6, 7 ) U32 AdcPgaGain; ///< AdcPgaGain : Valid param values ( 1, 1.5, 2, 4, 9 ) i.e interpreted as ( 0, 1, 2, 3, 4 ) respectively in Teensy. U32 DftNum; ///< DftNum : DFT number Valid param values ( 4096, 2048, 1024, 512, 256 ) i.e interpreted as ( 10, 9, 8, 7, 6 ) respectively in Teensy. U32 ADCAvgNum; ///< ADCAvgNum : Valid param values ( 2, 4, 8, 16 )i.e interpreted as ( 0, 1, 2, 3 ) respectively in Teensy. @@ -180,17 +181,17 @@ /// Structure to store calculated Conductivity and Temperature for each sensor. typedef struct { - OVERRIDE_F32_T Conductivity; - OVERRIDE_F32_T Resistance; - OVERRIDE_F32_T Temperature; + OVERRIDE_F32_T Conductivity; ///< Calculated Conductivity + OVERRIDE_F32_T Resistance; ///< Calculated Resistance + OVERRIDE_F32_T Temperature; ///< Calculated Temperature } COND_CALCULATED_MEASUREMENTS_T; /// Structure to enqueue and dequeue commands in the command queue typedef struct { - TEENSY_CMD_INDEX_T cmdIdx; - U08* teensyCMD; - U32 rxSize; + TEENSY_CMD_INDEX_T cmdIdx; ///< Command ID + U08* teensyCMD; ///< Pointer to string command + U32 rxSize; ///< Expected rx size in bytes } COND_CMD_DATA_T; // ********** public function prototypes ********** @@ -200,8 +201,8 @@ void signalConductivityReceiptCompleted( void ); void signalConductivityTransmitCompleted( void ); void addToConductivityCmdQ(TEENSY_CMD_INDEX_T teensyCmd); -F32 getTeensyConductivityValue( CONDUCTIVITY_SENSORS_T sensorId ); -F32 getTeensyConductivityTemperatureValue( CONDUCTIVITY_SENSORS_T sensorId ); +F32 getTeensyConductivityValue( U32 sensorId ); +F32 getTeensyConductivityTemperatureValue( U32 sensorId ); BOOL testSetTeenyConductivityModel( MESSAGE_T *message ); BOOL testTeensyConductivitySensorReadingsOverride( MESSAGE_T *message ); BOOL testTeensyConductivitySensorTemperatureReadingsOverride( MESSAGE_T *message );