X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=usb%2Fcore%2Fcore.c;h=bf3fbf729658b9658e687244d15ea5d1b7bf3966;hb=316456cf22ec6843102b39cb4a33b4bb3e484d45;hp=628e999602d555b4bb2fecf9635b9b8011845a4b;hpb=0a6c9cd0c045cc9481147531a8e3cc08aef20a98;p=ppcskel.git diff --git a/usb/core/core.c b/usb/core/core.c index 628e999..bf3fbf7 100644 --- a/usb/core/core.c +++ b/usb/core/core.c @@ -116,11 +116,9 @@ usb_device *usb_add_device() * wIndex = 0 * wLength = 64 // in fact just 8 bytes */ - //usb_control_msg(dev, 0x80, GET_DESCRIPTOR, DEVICE << 8, 0, 64, buf, 8, 0); - // length == 8 => no STALL?! :O usb_control_msg(dev, 0x80, GET_DESCRIPTOR, DEVICE << 8, 0, 64, buf, 8, 0); - printf("===========\nafter usb control msg:\n"); + printf("=============\nbuf: 0x%08X\nafter usb control msg:\n", buf); hexdump(buf, sizeof(buf)); #if 0 @@ -130,11 +128,13 @@ usb_device *usb_add_device() devdescr_size = (u8) buf[0]; /* save real length of device descriptor */ /* define new adress */ + /* usb_control_msg(dev, 0x00, SET_ADDRESS, address << 8, 0, 0, buf, 8, 0); dev->address = address; + */ /* get complete device descriptor */ - usb_control_msg(dev, 0x80, GET_DESCRIPTOR, 1, 0, devdescr_size, buf, 8, + usb_control_msg(dev, 0x80, GET_DESCRIPTOR, DEVICE<<8, 0, devdescr_size, buf, 8, 0); /* save only really neccessary values for this small usbstack */ @@ -279,7 +279,6 @@ u16 usb_submit_irp(usb_irp *irp) /* control message are always 8 bytes */ td->actlen = 8; - memcpy(mybuf, td->buffer, td->actlen); togl = 0; /* start with data0 */