Skip to content

GPIO input and outputs should be different types #39

Open

Description

@mvirkkunen

Currently the pins always implement both InputPin and OutputPin even thought the pin might not be in the correct mode, and presumably trying to use it in the wrong mode either doesn't work or causes an error.

This could be done neatly with type states and into_output style methods like many other HALs. This would also make them more convenient to use as the user then doesn't have to manually set the correct mode before constructing the pin.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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