Skip to content

Access the Pins by Index #382

@TheFrozenDuck

Description

@TheFrozenDuck

The documentation give a rather good overview of how to access pins using a pin's name. What I could not find though was how to access a pin by index. I would like to avoid matching like this:

match pin {
    0=>pins.gpio0.into_mode(),
    1=>pins.gpio1.into_mode(),
    2=>pins.gpio2.into_mode(),
    ...

Would that be possible to do?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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