* bRequest = GET_DESCRIPTOR
* wValue = DEVICE (Descriptor Type)
* wIndex = 0
- * wLength = 8 (in Bytes!?)
+ * wLength = 64 // in fact just 8 bytes
*/
- usb_control_msg(dev, 0x80, GET_DESCRIPTOR, DEVICE << 8, 0, 8, buf, 8, 0);
- //usb_control_msg(dev, 0x80, GET_DESCRIPTOR, DEVICE, 0, 64, buf, 8, 0);
+ usb_control_msg(dev, 0x80, GET_DESCRIPTOR, DEVICE << 8, 0, 64, buf, 8, 0);
printf("===========\nafter usb control msg:\n");
hexdump(buf, sizeof(buf));
/* wenn device descriptor von adresse 0 angefragt wird werden nur
* die ersten 8 byte abgefragt
*/
- if (setup->bRequest == GET_DESCRIPTOR && (setup->wValue >> 8) == 1
+ if (setup->bRequest == GET_DESCRIPTOR && (setup->wValue & 0xff) == 1
&& td->devaddress == 0) {
runloop = 0; /* stop loop */
}
printf("pid_setup\n");
tmptd->flags |= ACCESS_LE(OHCI_TD_DIRECTION_PID_SETUP);
tmptd->flags |= ACCESS_LE(OHCI_TD_TOGGLE_0);
+ tmptd->flags |= ACCESS_LE(OHCI_TD_BUFFER_ROUNDING);
break;
case USB_PID_OUT:
printf("pid_out\n");
tmptd->flags |= ACCESS_LE(OHCI_TD_DIRECTION_PID_OUT);
+ tmptd->flags |= ACCESS_LE(OHCI_TD_BUFFER_ROUNDING);
+
+ /*
+ * TODO: just temporary solution!
+ * there can be also regular PID_OUT pakets
+ */
tmptd->flags |= ACCESS_LE(OHCI_TD_TOGGLE_1);
break;
case USB_PID_IN:
printf("pid_in\n");
tmptd->flags |= ACCESS_LE(OHCI_TD_DIRECTION_PID_IN);
- /* let the endpoint do the togglestuff! */
+ tmptd->flags |= ACCESS_LE(OHCI_TD_BUFFER_ROUNDING);
+ /*
+ * let the endpoint do the togglestuff!
+ * TODO: just temporary solution!
+ * there can be also inregular PID_IN pakets (@Status Stage)
+ */
tmptd->flags |= ACCESS_LE(OHCI_TD_TOGGLE_CARRY);
#if 0
/* should be done by HC!
#endif
break;
}
- tmptd->flags |= ACCESS_LE(OHCI_TD_SET_DELAY_INTERRUPT(7) | OHCI_TD_BUFFER_ROUNDING);
+ tmptd->flags |= ACCESS_LE(OHCI_TD_SET_DELAY_INTERRUPT(7));
printf("tmptd hexdump (before) 0x%08X:\n", tmptd);
hexdump(tmptd, sizeof(struct general_td));