Skip to content

Automatically unexport pins #2

Description

@odiroot

I think it'd be useful to automatically unexport previously used pins.
Since a pin is in your case a normal Python object of Pin class its __del__ method
can be used to perform this task. This way pin will be freed during object's destruction.

Something along these lines;

 class Pin(object):
     # [...]
     def __del__(self):
         self.unexport()

There is obviously an issue when sb creates multiple instances of Pin objects referencing the same hardware pin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions