- /*
- udelay(600000);
-
- printf("=============\ninterfaces: %d\n", dev->conf->bNumInterfaces);
- u8 i;
- for(i = 1; i <= dev->conf->bNumInterfaces; i++) {
- memset(buf, 0, sizeof(buf));
- ret = usb_get_desc_interface(dev, 1, buf, sizeof(buf));
- printf("=============\nafter usb_get_desc_interface_%d(ret: %d):\n", i, ret);
- hexdump(buf, sizeof(buf));
- }
- */
-
-
-
- /*
- usb_get_descriptor(dev, DEVICE, 0, buf, 8);
- memset(buf, 0, 8);
- usb_get_descriptor(dev, DEVICE, 0, buf, size >= buf[0] ? buf[0] : size);
- */
-#if 0
- memset(buf, 0, sizeof(buf));
- usb_control_msg(dev, 0x80, GET_DESCRIPTOR, (DEVICE << 8) | 0, 0, 8, buf, 0);
- printf("=============\nbuf: 0x%08X\nafter usb control msg:\n", buf);
- hexdump(buf, sizeof(buf));
-
- memset(buf, 0, sizeof(buf));
- usb_control_msg(dev, 0x80, GET_DESCRIPTOR, (DEVICE << 8) | 0, 0, buf[0], buf, 0);
- printf("=============\nbuf: 0x%08X\nafter usb control msg:\n", buf);
- hexdump(buf, sizeof(buf));
-
- memset(buf, 0, sizeof(buf));
- usb_get_string_simple(dev, 1, buf);
- printf("=============\nbuf: 0x%08X\nafter usb control msg:\n", buf);
- hexdump(buf, sizeof(buf));
-#endif
-
-#if 0
- u8 devdescr_size;
-
- /* setup real ep0 fifo size */
- dev->bMaxPacketSize0 = (u8) buf[7];
- if(!(u8)buf[7]) {
- printf("FU\n");
- return (void*)1;
- }
-
- /* save real length of device descriptor */
- devdescr_size = (u8) buf[0];
-
- /* define new adress */
- memset(buf, 0, sizeof(buf));
- usb_control_msg(dev, 0x00, SET_ADDRESS, address, 0, 0, buf, 8, 0);
- dev->address = address;
- printf("=============\nbuf: 0x%08X\nafter usb control msg:\n", buf);
- hexdump(buf, sizeof(buf));
- printf("address: %d\n", address);
-
-
- /* get complete device descriptor */
- memset(buf, 0, sizeof(buf));
- usb_control_msg(dev, 0x80, GET_DESCRIPTOR, DEVICE<<8, 0, devdescr_size, buf, 8, 0);
-
- printf("=============\nbuf: 0x%08X\nafter usb control msg:\n", buf);
- hexdump(buf, sizeof(buf));
-
- /* save only really neccessary values for this small usbstack */
-#endif
-
-#if 0
- memset(buf, 0, sizeof(buf));
- usb_control_msg(dev, 0x80, GET_DESCRIPTOR, (STRING<<8)|2, 0, 0x1a, buf, 8, 0);
- hexdump(buf, sizeof(buf));
- printf("String Descriptor [1]: ");
- u8 i;
- for (i=2; i<buf[0]; i+=2)
- printf("%c", buf[i]);
- printf("\n");
-#endif
-
- /*
- usb_control_msg(dev, 0x80, GET_DESCRIPTOR, (STRING<<8) | 2, 0, 0x20, buf, 8, 0);
- printf("String Descriptor [2]: ");
- for (i=2; i<buf[0]; i+=2)
- printf("%c", buf[i]);
- printf("\n");
- */
-
- // string descriptoren werden nicht im arbeitsspeicher gehalten -> on demand mit
- // entprechenden funktionen
- // hier muss man noch mehr abholen, konfigurationene, interfaces und endpunkte