mirror of
https://github.com/gdsports/USBHost_t36
synced 2024-12-22 07:18:54 -05:00
Query device status, idVendor and idProduct
This commit is contained in:
parent
d3b6abe878
commit
adc8a3239f
@ -322,6 +322,9 @@ protected:
|
||||
// All USB device drivers inherit from this base class.
|
||||
class USBDriver : public USBHost {
|
||||
public:
|
||||
operator bool() { return (device != nullptr); }
|
||||
uint16_t idVendor() { return (device != nullptr) ? device->idVendor : 0; }
|
||||
uint16_t idProduct() { return (device != nullptr) ? device->idProduct : 0; }
|
||||
// TODO: user-level functions
|
||||
// check if device is bound/active/online
|
||||
// query vid, pid
|
||||
|
Loading…
Reference in New Issue
Block a user