Commit Graph

2 Commits

Author SHA1 Message Date
Scott Shawcroft
255e997345
Rework the analogbufio API.
* read() is now readinto() and takes the buffer to write into.
* readinto() returns the number of valid samples.
* readinto() can be interrupted by ctrl-c.
* readinto() API doesn't support signed numbers because it never did.
* sample_rate is now required in the constructor because supported
  values will vary per-port.
* 16 bit values are full range. 12 bit samples from RP2040 are stretched
  in the same way they are for AnalogIn.

Fixes #7226
2022-12-01 17:46:07 -08:00
latkinso42
a1856ea3e9 Renaming module from adcbuffer to analogbufio 2022-09-05 12:11:49 -04:00