1
0
Fork 0
forked from len0rd/rockbox

Try at implementing interrupt endpoints in the Ingenic Jz4740 USB driver

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20973 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Maurus Cuelenaere 2009-05-16 23:04:54 +00:00
parent 98b7da47e1
commit 03ea249297

View file

@ -854,17 +854,22 @@ void usb_drv_release_endpoint(int ep)
int usb_drv_request_endpoint(int type, int dir) int usb_drv_request_endpoint(int type, int dir)
{ {
logf("usb_drv_request_endpoint(%s)", (dir == USB_DIR_IN) ? "IN" : "OUT"); logf("usb_drv_request_endpoint(%d, %s)", type, (dir == USB_DIR_IN) ? "IN" : "OUT");
if (type != USB_ENDPOINT_XFER_BULK) dir &= USB_ENDPOINT_DIR_MASK;
return -1; type &= USB_ENDPOINT_XFERTYPE_MASK;
/* There are only 3+2 endpoints, so hardcode this ... */ /* There are only 3+2 endpoints, so hardcode this ... */
/* Currently only BULK endpoints ... */ switch(type)
if(dir == USB_DIR_OUT) {
return (1 | USB_DIR_OUT); case USB_ENDPOINT_XFER_BULK:
else if(dir == USB_DIR_IN) return (1 | dir);
return (1 | USB_DIR_IN);
else case USB_ENDPOINT_XFER_INT:
return -1; if(dir == USB_DIR_IN)
return (2 | USB_DIR_IN);
default:
return -1;
}
} }