Skip to content

Implement function to check usb connection #3513

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

Merged
merged 1 commit into from
Mar 18, 2021
Merged

Implement function to check usb connection #3513

merged 1 commit into from
Mar 18, 2021

Conversation

microdev1
Copy link
Collaborator

@microdev1 microdev1 commented Oct 6, 2020

Running the following code will return the USB mount status.

import supervisor
print(supervisor.runtime.usb_connected)

This PR is linked to issue #544.

@microdev1 microdev1 marked this pull request as draft November 25, 2020 09:46
@tannewt
Copy link
Member

tannewt commented Dec 1, 2020

This is superseded by #3767 I believe. (If not, I can reopen.)

@tannewt tannewt closed this Dec 1, 2020
@microdev1
Copy link
Collaborator Author

@tannewt Seems like this functionality is still missing.
I plan to employ tud_ready() for this... it checks for usb mounted and not suspended.

@microdev1 microdev1 reopened this Mar 17, 2021
@microdev1 microdev1 marked this pull request as ready for review March 17, 2021 05:32
@microdev1 microdev1 requested a review from tannewt March 17, 2021 05:32
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One, thing. Good otherwise. Thanks!

@microdev1 microdev1 requested a review from tannewt March 18, 2021 04:31
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tannewt tannewt merged commit e3c54b0 into adafruit:main Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants