Skip to content

Add end() for GenericDevice #145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

brentru
Copy link
Member

@brentru brentru commented Jun 18, 2025

@ladyada This adds an end() function for GenericDevice. Since GenericDevice takes in a generic obj, and we do not know what obj is abstracting, all this function does is toggle the begin boolean.

If a user is interfacing with GenericDevice from within a class, like UartDevice in your example, they should implement end() for their specific transport (i.e: Serial) within that class. I've made a NOTE in the comment.

Resolves: #143

@brentru brentru requested a review from ladyada June 18, 2025 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adafruit_GenericDevice missing end()
2 participants