98 #define LTC2308_CS QUIKEVAL_CS 104 #define LTC2308_CH0 0x80 105 #define LTC2308_CH1 0xC0 106 #define LTC2308_CH2 0x90 107 #define LTC2308_CH3 0xD0 108 #define LTC2308_CH4 0xA0 109 #define LTC2308_CH5 0xE0 110 #define LTC2308_CH6 0xB0 111 #define LTC2308_CH7 0xF0 117 #define LTC2308_P0_N1 0x00 118 #define LTC2308_P1_N0 0x40 120 #define LTC2308_P2_N3 0x10 121 #define LTC2308_P3_N2 0x50 123 #define LTC2308_P4_N5 0x20 124 #define LTC2308_P5_N4 0x60 126 #define LTC2308_P6_N7 0x30 127 #define LTC2308_P7_N6 0x70 133 #define LTC2308_UNIPOLAR_MODE 0x08 134 #define LTC2308_BIPOLAR_MODE 0x00 136 #define LTC2308_SINGLE_ENDED_MODE 0x80 137 #define LTC2308_DIFFERENTIAL_MODE 0x00 143 #define LTC2308_SLEEP_MODE 0x01 144 #define LTC2308_NORMAL_MODE 0x00 146 #define LTC2308_NAP_MODE 0x02 static uint8_t adc_command
static uint8_t uni_bipolar
Default set for unipolar mode.
float LTC2308_code_to_voltage(uint16_t adc_code, float vref, uint8_t uni_bipolar)
Calculates the LTC2308 input's unipolar voltage given the binary data and lsb weight.
void LTC2308_read(uint8_t cs, uint8_t adc_command, uint16_t *adc_code)
Reads the ADC and returns 16-bit data.