summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-09-08 03:31:11 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-09-08 03:31:11 +0000
commitd2871ff8531a0da3124c9201ceccb56e5cb38d03 (patch)
tree18a81e42d9e473617cdd26e938cc05499489b180 /firmware
parent8c4f83ec00f821d444f59fcc9530a59ba3eaafc1 (diff)
downloadrockbox-d2871ff8531a0da3124c9201ceccb56e5cb38d03.tar.gz
rockbox-d2871ff8531a0da3124c9201ceccb56e5cb38d03.tar.bz2
rockbox-d2871ff8531a0da3124c9201ceccb56e5cb38d03.zip
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
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/usb-s3c6400x.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/target/arm/usb-s3c6400x.c b/firmware/target/arm/usb-s3c6400x.c
index dbba9f39aa..23347ccf83 100644
--- a/firmware/target/arm/usb-s3c6400x.c
+++ b/firmware/target/arm/usb-s3c6400x.c
@@ -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 */