uhci.h 1004 B

123456789101112131415161718192021222324
  1. /* UHCI (USB 1.1) host controller driver.
  2. PCI discovery, register access, frame-list / queue-head / transfer-
  3. descriptor schedule, and root-hub port control. Polling based (no IRQ). */
  4. #ifndef UHCI_H
  5. #define UHCI_H
  6. int uhci_init(void); /* find + reset/configure the controller; 0 on success */
  7. void uhci_pci_info(unsigned int *bus, unsigned int *dev, unsigned int *func,
  8. unsigned int *io_base);
  9. unsigned int uhci_root_port_count(void);
  10. int uhci_root_port_connected(unsigned int port);
  11. int uhci_root_port_low_speed(unsigned int port);
  12. int uhci_root_port_reset(unsigned int port);
  13. /* Control transfer on endpoint 0. Returns bytes transferred (>= 0) or -1.
  14. mps = device max packet size for endpoint 0 (used to split the data stage).
  15. dir_in: 1 = data stage IN (device->host), 0 = OUT or no data stage. */
  16. int uhci_control_transfer(unsigned int dev_addr, unsigned int mps, int low_speed,
  17. const unsigned char *setup, unsigned char *data,
  18. unsigned int len, int dir_in);
  19. #endif