53uint16_t
read(uint8_t channel);
61bool scan(uint8_t last_channel, uint16_t* results);
90uint32_t
startBurst(uint8_t channel, uint16_t* buffer,
size_t count, uint32_t sample_rate_hz);
constexpr uint8_t kChannels
Number of input channels (AIN0-AIN3).
Definition max11635.h:25
uint8_t averaging()
Current averaging setting.
uint16_t read(uint8_t channel)
Runs one conversion (averaged if setAveraging() is on).
constexpr uint32_t kMaxTimedBurstHz
Fastest burst taken with a timer interrupt (clock mode 00), in samples per second.
Definition max11635.h:27
uint32_t startBurst(uint8_t channel, uint16_t *buffer, size_t count, uint32_t sample_rate_hz)
Starts sampling one channel at a fixed rate into buffer, in the background.
bool readDifferential(uint8_t pair, bool bipolar, int16_t *code)
True differential conversion of a channel pair, both inputs sampled at once.
bool scan(uint8_t last_channel, uint16_t *results)
Converts channels 0 to last_channel in one scan, a few µs apart.
void setAveraging(uint8_t samples)
Sets how many conversions the chip averages for each result.
bool burstDone()
Whether the burst has finished; tidies up the chip and SPI when it has.
void begin()
Configures SPI0 and the control pins, resets the ADC and applies the averaging setting....
constexpr uint32_t kMaxBurstHz
Fastest burst (clock mode 11, SCLK = 16 x rate, at most 4.8 MHz), in samples per second.
Definition max11635.h:29
void stopBurst()
Stops a running burst; the buffer's contents are then not valid.