-
Notifications
You must be signed in to change notification settings - Fork 353
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
Support supervisor.runtime.usb_connected
, at least
#711
Comments
@dhalbert I've looked over Blinka HID support and my understanding is that it is implemented only for boards running Linux. |
Raspberry Pi Zeros definitely support OTG (USB gadget). RPI 4 does, but it appears to be only through the USB-C port. RPi 3 and older do not. |
@dhalbert The good news is that
We could wrap |
@eightycc You could wrap the calls, but the user code is still going to need to do something, as you point out. But even if you can create the device when it's not plugged in, is there some way to test whether an enumeration happened with a USB host so we can implement |
@dhalbert The best we can do is implement a I think we'll still need some wrapping. It's not uncommon for a USB HID device to get hot plugged/unplugged. |
So if there is no gadget tree in the fileystem, then could |
Believe me, I'm not trying to belabor this issue, just trying to think it through. Checking for the existence of the gadget fs is certainly feasible, getting it to tell us the state of the host connection short of pushing a null report is problematical. I'm looking at |
Not trying to give you a hard time 😆 . I haven't looked at this stuff at all, and it can be quite arcane. Trying to find out things about USB device was also arcane when I had to look at that. Pushing a null report is device-specific, and I was glad we got rid of that in the latest release. |
Yes, it really is. The USB designers must have had access to some really good herb. A cursory look at I don't want to burn up too many of your cycles on this, and I'm anxious to look into a more interesting issue, so let me put this aside for a few days (I don't think there's any urgency) and I'll get back to it later. |
usb_hid
is supported in a limited way in Blinka, usingusb_gadget
.adafruit/Adafruit_CircuitPython_HID#118 would like to test for USB enumeration having happened. Right now there is no support at all for
supervisor
in Blinka. But it would be nice to add some support for the USB-related supervisor operations.The text was updated successfully, but these errors were encountered: