altos: get ao_max6691 driver working
authorKeith Packard <keithp@keithp.com>
Sun, 21 Apr 2019 23:49:19 +0000 (16:49 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 21 Apr 2019 23:54:54 +0000 (16:54 -0700)
The driver uses a timer connected to a DMA engine to measure pulse
widths from the chip. We get 11 pulses for 4 channels; the first pulse
is caused by the timer starting up, the next two are the marker pulse
and then 8 more indicating the end of the high and low periods for
each channel.

The driver API returns the 8 pulse widths; the caller is expected to
know what to do with those values as using them requires knowing the
value of the configuration resistor and the characteristics of the
thermistors.

The test code assumes a 1k configuration resistor, using that it computes
the resistance of the four thermistors.

Signed-off-by: Keith Packard <keithp@keithp.com>

No differences found