usb-s3c6400x.c : don't hardcode USB_NUM_ENDPOINTS but use the define

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28036 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rafaël Carré 2010-09-08 03:31:11 +00:00
parent 8c4f83ec00
commit d2871ff853

View file

@ -49,7 +49,7 @@ struct ep_type
struct wakeup complete;
} ;
static struct ep_type endpoints[5];
static struct ep_type endpoints[USB_NUM_ENDPOINTS];
static struct usb_ctrlrequest ctrlreq USB_DEVBSS_ATTR;
int usb_drv_port_speed(void)
@ -106,7 +106,7 @@ int usb_drv_request_endpoint(int type, int dir)
if (dir == USB_DIR_IN) ep = 1;
else ep = 2;
while (ep < 5)
while (ep < USB_NUM_ENDPOINTS)
{
if (!endpoints[ep].active)
{
@ -219,7 +219,7 @@ void INT_USB_FUNC(void)
}
if (ints & 0x80000) /* OUT EP event */
for (i = 0; i < 5; i += 2)
for (i = 0; i < USB_NUM_ENDPOINTS; i += 2)
if ((epints = DOEPINT(i)))
{
if (epints & 1) /* Transfer completed */