pico-sdk icon indicating copy to clipboard operation
pico-sdk copied to clipboard

Some useful macros for ADC module

Open Kucmasz opened this issue 2 years ago • 0 comments

Implementation of 2 simple values related to ADC (reference voltage and max read value) that make calculations of actual voltage readings easier.

Also, since there is a linear relationship between ADC channels and GPIO pins connected to ADC, a simple conversion macro can be added to convert (redefined) GPIO pins number from any configuration list to an ADC channel related to them.

Fixes #1512

Kucmasz avatar Sep 15 '23 07:09 Kucmasz