Index: Common.h =================================================================== diff -u -r69a0182c54b996ab7ed94e9b3071d49588a1710a -r448294501a7a561274286907e9c20ab2400daff3 --- Common.h (.../Common.h) (revision 69a0182c54b996ab7ed94e9b3071d49588a1710a) +++ Common.h (.../Common.h) (revision 448294501a7a561274286907e9c20ab2400daff3) @@ -59,12 +59,12 @@ NUM_OF_SELF_TEST_STATUS ///< Number of self-test status } SELF_TEST_STATUS_T; -/// List of 2-way valve states. +/// List of 2-way states. typedef enum Two_Way_States { - STATE_CLOSED = 0, ///< Valve is closed state - STATE_OPEN, ///< Valve is open state - NUM_OF_OPN_CLS_STATES ///< Number of 2-way valve states + STATE_CLOSED = 0, ///< Closed state + STATE_OPEN, ///< Open state + NUM_OF_OPN_CLS_STATES ///< Number of 2-way states } OPN_CLS_STATE_T; /// List of motor directions. @@ -83,13 +83,6 @@ NUM_OF_PUMP_CONTROL_MODES ///< Number of pump control modes } PUMP_CONTROL_MODE_T; -/// List of switch states. -typedef enum Switch_States -{ - TURN_OFF = 0, ///< Turn off - TURN_ON, ///< Turn on -} SWITCH_STATES_T; - // **** Common Definitions **** #define NEARLY_ZERO 0.00000001 ///< Value that is nearly zero. Used for floating point zero comparisons (e.g. divide by zero checks) @@ -112,13 +105,19 @@ #define SHIFT_BITS_BY_4 4U ///< Number of bits to shift in order to shift a nibble #define FLOAT_TO_INT_ROUNDUP_OFFSET 0.5 ///< Offset to add to a floating point value for rounding rounding when converting to integer #define ML_PER_LITER 1000 ///< Number of milliliters in a liter +#define MA_PER_AMP 1000 ///< Number of milliamps in an amp #define MS_PER_SECOND 1000 ///< Number of milliseconds in a second #define US_PER_SECOND 1000000 ///< Number of microseconds in a millisecond #define SEC_PER_MIN 60 ///< Number of seconds in a minute #define FRACTION_TO_PERCENT_FACTOR 100.0 ///< Percentage factor (100) #define MIN_PER_HOUR 60 ///< Number of minutes in an hour #define PI 3.1415927 ///< PI #define SECONDS_IN_A_DAY 86400 ///< Number of seconds in a day +#define BITS_8_FULL_SCALE 256 ///< Full scale range for 8 bit ADC or DAC +#define BITS_10_FULL_SCALE 1024 ///< Full scale range for 10 bit ADC or DAC +#define BITS_12_FULL_SCALE 4096 ///< Full scale range for 12 bit ADC or DAC +#define BITS_14_FULL_SCALE 16384 ///< Full scale range for 14 bit ADC or DAC +#define BITS_16_FULL_SCALE 65536 ///< Full scale range for 16 bit ADC or DAC // **** Common Macros ****