#debug flags; DU = Debug USB
#CFLAGS += -D _DU_OHCI_F #fire @ u/h/ohci.c
-#CFLAGS += -D _DU_OHCI_F_HALT #halted @ u/h/ohci.c
+CFLAGS += -D _DU_OHCI_F_HALT #halted @ u/h/ohci.c
#CFLAGS += -D _DU_OHCI_Q #enqueue @ u/h/ohci.c
#CFLAGS += -D _DU_OHCI_RH #roothub @ u/h/ohci.c
CFLAGS += -D _DU_CORE #@ u/c/core.c
return (void*) -1;
}
- u8 buf[8];
//#define WTF
#ifdef WTF
printf("lololololool PADDING WTF :O lolololololo \n");
printf("=============\nusb_set_configuration(ret: %d) %d\n", ret, dev->conf->bConfigurationValue);
printf("=============\nusb_get_configuration: %d\n", usb_get_configuration(dev));
+#if 0
+ u8 buf[8];
memset(buf, 0, 8);
- usb_control_msg(dev, 0x00, SET_INTERFACE, 0, dev->conf->intf->bInterfaceNumber, 8, buf, 0);
+ usb_control_msg(dev, 0x00, SET_INTERFACE, 0, dev->conf->intf->bInterfaceNumber, 0, buf, 0);
printf("=============\nusb_set_interface: %d\n", dev->conf->intf->bInterfaceNumber);
hexdump((void*)buf, 8);
memset(buf, 0, 8);
- usb_control_msg(dev, 0x80, GET_INTERFACE, 0, 0, 8, buf, 0);
+ usb_control_msg(dev, 0x81, GET_INTERFACE, 0, dev->conf->intf->bInterfaceNumber, 8, buf, 0);
printf("=============\nusb_get_interface: %d\n", buf[0]);
hexdump((void*)buf, 8);
+#endif
#if 0
/* add device to device list */
off += 7;
}
}
-
- printf("=============\nafter usb_get_desc_config_ext:\n");
- hexdump((void*) gbuf, dev->conf->wTotalLength);
return 0;
}
u8 usb_get_configuration(struct usb_device *dev)
{
cleargbuf();
- usb_control_msg(dev, 0x80, GET_CONFIGURATION, 0, 0, 8, gbuf, 0);
+ usb_control_msg(dev, 0x80, GET_CONFIGURATION, 0, 0, 4, gbuf, 0);
+ printf("=============\nafter usb_get_configuration:\n");
+ hexdump((void*) gbuf, 1);
return gbuf[0];
}