Skip to content

Add a function returning currently used analogRead resolution #563

Description

@4project-co-il

I'm surprised there is no function in Arduino suite that returns ADC's resolution (in bits), or maximal value that cane be read from analogRead().

Having such function will allow writing a more cross-platform code that uses ADC.
For ATMega328 such function might be hard-coded to 10bit or 1023.
Other cores will return other hard-coded values or currently used ADC's resolution based on controller registers.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions