Skip to content

analogReadResolution should be implemented #161

Closed
@cbxbiker61

Description

@cbxbiker61

sam/samd/arc32 architectures use analogReadResolution to set the analogRead() bit resolution and it looks like this will be a "normal" api call.

I see analogSetWidth in esp32-hal-adc.h. It would be extremely easy to put a compatible analogReadResolution in that calls analogSetWidth.

Something to keep in mind is that analogReadResolution can be set up to 16 bits. If the bit resolution exceeds the ADC's actual capabilities, analogRead is expected to bit-shift the ADC's result to get a 16-bit result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions