CTL_STATUS_t ltc2309_sample_single_ended_unipolar(CTL_ADC_t *self,
                                                  int channel,
                                                  float *sample);

ltc2309_sample_single_ended_unipolar samples channel channel in single-ended mode using COM as the negative terminal. The object pointed to by sample is written to a value between 0 and 1 (inclusive) that represents the value sampled.

Return Value

ltc2309_sample_single_ended_unipolar returns a standard status code.

Thread Safety

ltc2309_sample_single_ended_unipolar is thread-safe if a mutex is associated with the I2C bus bus.