Skip to content

analogRead() does not properly handle values 8..15 on Grand Central. #236

Open
@WestfW

Description

@WestfW

The code in analogRead() does not not handle integer arguments of 8..15, which are valid analog pins on Grand Central. Worse, it will do "bad things", like setting PINMUX to "analog" on pins that don't even have analog support.

https://forums.adafruit.com/viewtopic.php?f=63&t=157146
https://forums.adafruit.com/viewtopic.php?f=63&t=167446

There's enough special code in analogRead() already that it really ought to handle this as well. It should at least not do bad things (and doing the right thing is just as easy...)

I have a patch and will submit a pull-request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions