110 #define LTC2418_CS QUIKEVAL_CS 116 #define LTC2418_CH0 0xB0 117 #define LTC2418_CH1 0xB8 118 #define LTC2418_CH2 0xB1 119 #define LTC2418_CH3 0xB9 120 #define LTC2418_CH4 0xB2 121 #define LTC2418_CH5 0xBA 122 #define LTC2418_CH6 0xB3 123 #define LTC2418_CH7 0xBB 124 #define LTC2418_CH8 0xB4 125 #define LTC2418_CH9 0xBC 126 #define LTC2418_CH10 0xB5 127 #define LTC2418_CH11 0xBD 128 #define LTC2418_CH12 0xB6 129 #define LTC2418_CH13 0xBE 130 #define LTC2418_CH14 0xB7 131 #define LTC2418_CH15 0xBF 137 #define LTC2418_P0_N1 0xA0 138 #define LTC2418_P1_N0 0xA8 140 #define LTC2418_P2_N3 0xA1 141 #define LTC2418_P3_N2 0xA9 143 #define LTC2418_P4_N5 0xA2 144 #define LTC2418_P5_N4 0xAA 146 #define LTC2418_P6_N7 0xA3 147 #define LTC2418_P7_N6 0xAB 149 #define LTC2418_P8_N9 0xA4 150 #define LTC2418_P9_N8 0xAC 152 #define LTC2418_P10_N11 0xA5 153 #define LTC2418_P11_N10 0xAD 155 #define LTC2418_P12_N13 0xA6 156 #define LTC2418_P13_N12 0xAE 158 #define LTC2418_P14_N15 0xA7 159 #define LTC2418_P15_N14 0xAF 165 uint16_t miso_timeout
void LTC2418_cal_voltage(int32_t zero_code, int32_t fs_code, float zero_voltage, float fs_voltage, float *LTC2418_lsb, int32_t *LTC2418_offset_code)
Calibrate the lsb.
static uint8_t adc_command
static int32_t LTC2418_offset_code
Ideal offset for a perfect part.
int8_t LTC2418_EOC_timeout(uint8_t cs, uint16_t miso_timeout)
Checks for EOC with a specified timeout.
float LTC2418_code_to_voltage(int32_t adc_code, float LTC2418_lsb, int32_t LTC2418_offset_code)
Calculates the LTC2418 input bipolar voltage.
static float LTC2418_lsb
Ideal LSB voltage for a perfect part.
void LTC2418_read(uint8_t cs, uint8_t adc_command, uint32_t *adc_code)
Reads the LTC2418 result and programs the configuration for the next conversion.