#ifndef __USB_HUB_H
#define __USB_HUB_H
-struct usbhub_s {
- struct usb_pipe *pipe;
- struct usb_s *cntl;
- struct mutex_s lock;
- u32 powerwait;
- u32 port;
- u32 threads;
- u32 devcount;
-};
-
// usb-hub.c
struct usb_pipe;
int usb_hub_init(struct usb_pipe *pipe);
#define USB_PORT_STAT_RESET 0x0010
#define USB_PORT_STAT_L1 0x0020
#define USB_PORT_STAT_POWER 0x0100
+#define USB_PORT_STAT_SPEED_SHIFT 9
+#define USB_PORT_STAT_SPEED_MASK (0x3 << USB_PORT_STAT_SPEED_SHIFT)
#define USB_PORT_STAT_LOW_SPEED 0x0200
#define USB_PORT_STAT_HIGH_SPEED 0x0400
#define USB_PORT_STAT_TEST 0x0800