106 #define LTC2305_I2C_ADDRESS 0x08 // LOW LOW 120 #define LTC2305_CH0 0xC0 121 #define LTC2305_CH1 0x80 128 #define LTC2305_SLEEP_MODE 0x04 129 #define LTC2305_EXIT_SLEEP_MODE 0x00 130 #define LTC2305_UNIPOLAR_MODE 0x08 131 #define LTC2305_BIPOLAR_MODE 0x00 132 #define LTC2305_SINGLE_ENDED_MODE 0x80 133 #define LTC2305_DIFFERENTIAL_MODE 0x00 134 #define LTC2305_P0_N1 0x00 135 #define LTC2305_P1_N0 0x40 156 uint16_t *ptr_adc_code
static uint8_t adc_command
static uint8_t uni_bipolar
Default set for unipolar mode.
int8_t LTC2305_read(uint8_t i2c_address, uint8_t adc_command, uint16_t *ptr_adc_code)
Reads 12-bit code from LTC2305, programs channel and mode for next conversion.
static float LTC2305_vref
float LTC2305_code_to_voltage(uint16_t adc_code, float LTC2305_vref, uint8_t uni_bipolar)
Calculates the LTC2305 input voltage.