1
0
Fork 0
forked from len0rd/rockbox

we use only 2 endpoints

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14502 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Christian Gmeiner 2007-08-29 09:17:15 +00:00
parent d70857b2da
commit 7d4c7f9f28
3 changed files with 15 additions and 5 deletions

View file

@ -219,6 +219,8 @@ void usb_arcotg_dcd_stop(void)
void usb_arcotg_dcd_irq(void)
{
int i;
if (dcd_controller.stopped == true) {
return;
}
@ -240,9 +242,16 @@ void usb_arcotg_dcd_irq(void)
UDC_ENDPTSETUPSTAT = UDC_ENDPTSETUPSTAT;
setup_received_int(&dcd_controller.local_setup_buff);
}
/*
if (UDC_ENDPTCOMPLETE) {
UDC_ENDPTCOMPLETE = UDC_ENDPTCOMPLETE;
}*/
}
for (i = 0; i < USB_MAX_ENDPOINTS; i++) {
if ((UDC_ENDPTCOMPLETE & (1 << i)) == 1) {
logf("COMPLETE on %d", i);
UDC_ENDPTCOMPLETE |= (1 << i);
}
}
@ -605,6 +614,7 @@ int usb_arcotg_dcd_enable(struct usb_ep* ep,
#endif
/* set address of used ep in desc */
logf("ep address %x", desc->bEndpointAddress);
desc->bEndpointAddress |= ep->ep_num;
/* here initialize variable of ep */

View file

@ -152,10 +152,10 @@
/* USB On-the-go */
#define CONFIG_USBOTG USBOTG_ARC
/* enable these for the experimental usb stack
/* enable these for the experimental usb stack*/
#define HAVE_USBSTACK
#define USBSTACK_CAPS CONTROLLER_DEVICE
*/
/* Virtual LED (icon) */
#define CONFIG_LED LED_VIRTUAL

View file

@ -77,7 +77,7 @@ static struct usb_interface_descriptor storage_interface_desc = {
.bLength = USB_DT_INTERFACE_SIZE,
.bDescriptorType = USB_DT_INTERFACE,
.bInterfaceNumber = 0,
.bNumEndpoints = 3,
.bNumEndpoints = 2,
.bInterfaceClass = USB_CLASS_MASS_STORAGE,
.bInterfaceSubClass = SUBCL_SCSI,
.bInterfaceProtocol = PROTO_BULK,
@ -293,7 +293,7 @@ static int config_buf(uint8_t *buf, uint8_t type, unsigned index)
static int set_config(int config)
{
(void)config;
/* enable endpoints */
logf("setup %s", dev.in->name);
ops->enable(dev.in, (struct usb_endpoint_descriptor*)dev.descriptors[1]);