Skip to content

Store/manage all instances of GPIOPin #59

@EnotionZ

Description

@EnotionZ

Since gpio.open acts like a Factory pattern for a discrete number of pins, there's no reason why we shouldn't store the GPIOPin instances internally. The benefit is that gpio.close will get all the benefit of contextually closing from the instance (port.close) like killing the filewatcher or whatever else we may add in the future.

The other benefit is if a user happens to open a port that has already been opened, then we can return the GPIOPin instance immediately without trying to close and reopen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions