dat.h 675 B

123456789101112131415161718192021222324252627282930
  1. typedef struct Hub Hub;
  2. typedef struct Port Port;
  3. struct Hub
  4. {
  5. byte pwrmode;
  6. byte compound;
  7. byte pwrms; /* time to wait in ms after powering port */
  8. byte maxcurrent;
  9. byte nport;
  10. Port *port;
  11. int isroot; /* set if this hub is a root hub */
  12. int portfd; /* fd of /dev/usb%d/port if root hub */
  13. int ctlrno; /* number of controller this hub is on */
  14. Device* dev0; /* device 0 of controller */
  15. Device* d; /* device of hub (same as dev0 for root hub) */
  16. };
  17. struct Port
  18. {
  19. byte removable;
  20. byte pwrctl;
  21. Device *d; /* attached device (if non-nil) */
  22. Hub *hub; /* non-nil if hub attached */
  23. };
  24. #pragma varargck type "H" Hub*
  25. extern int verbose;