Sfoglia il codice sorgente

Query device status, idVendor and idProduct

main
PaulStoffregen 7 anni fa
parent
commit
adc8a3239f
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. +3
    -0
      USBHost_t36.h

+ 3
- 0
USBHost_t36.h Vedi File

@@ -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…
Annulla
Salva