Skip to main content
5 events
when toggle format what by license comment
Dec 3, 2020 at 23:06 vote accept Tony Nguyen
Nov 29, 2020 at 19:28 answer added Thomas Guyot-Sionnest timeline score: 3
Nov 27, 2020 at 16:05 comment added Tony Nguyen Thank you for your advice @ThomasGuyot-Sionnest. To be more clear, I am writing a source code so that my board can determine whether any kind of USB is plugged in this USB port. For example, when a USB is plugged in, the LED will turns green indicating that USB is present. If the USB is unplugged, the LED will turn red.
Nov 27, 2020 at 6:50 comment added Thomas Guyot-Sionnest Your intentions are a bit unclear - are you trying to tell if the port has something connected to it, or if a specific device is connected to a usb-c port? In any case you'll have to work from a usb device and trace back up where they are connected to (I'm not familiar with usb-c specifically but if it just draws current without being seen as a device it may make things much harder) . If you want to use an event-based approach the best place to hook yourself to is udevd, and walk up DEVPATH (on bootup the event would still be triggered as the usb devices are added).
Nov 27, 2020 at 4:52 history asked Tony Nguyen CC BY-SA 4.0