* 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
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 */
/* control message are always 8 bytes */
td->actlen = 8;
- memcpy(mybuf, td->buffer, td->actlen);
togl = 0;
/* start with data0 */