X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=usb%2Fcore%2Fusb.c;h=0d8edca3cf4787735e91455a62242aa9c0d48ab5;hb=4bdf4447cdcbb235dc4d22a9c7ec2b481df1156b;hp=d30f83d341607655f0a268204d4eff9792eccf1c;hpb=251726c276ab844095583d4c8d7607a30c0a802c;p=ppcskel.git diff --git a/usb/core/usb.c b/usb/core/usb.c index d30f83d..0d8edca 100644 --- a/usb/core/usb.c +++ b/usb/core/usb.c @@ -135,14 +135,15 @@ u8 usb_reset(usb_device *dev) */ u8 usb_control_msg(usb_device *dev, u8 requesttype, u8 request, u16 value, u16 index, u16 length,char *buf, u16 size, u16 timeout) { + //usb_control_msg(dev, 0x80, GET_DESCRIPTOR, 1, 0, 8, buf, 8, 0); usb_irp *irp = (usb_irp*)malloc(sizeof(usb_irp)); irp->dev = dev; - //irp->devaddress = dev->address; irp->endpoint = 0; irp->epsize = dev->bMaxPacketSize0; irp->type = USB_CTRL; +#if 0 buf[0]=(char)requesttype; buf[1]=(char)request; buf[2]=(char)(value >> 8); @@ -152,6 +153,19 @@ u8 usb_control_msg(usb_device *dev, u8 requesttype, u8 request, u16 value, u16 i // lenght buf are the only where the order is inverted buf[6]=(char)(length); buf[7]=(char)(length >> 8); +#endif +#if 1 + //should be the right way around? :O + buf[0]=(char)requesttype; + buf[1]=(char)request; + buf[2]=(char)(value); + buf[3]=(char)(value >> 8); + buf[4]=(char)(index); + buf[5]=(char)(index >> 8); + // lenght buf are the only where the order is inverted + buf[6]=(char)(length >> 8); + buf[7]=(char)(length); +#endif irp->buffer = buf; irp->len = length;