diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/m66591.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/firmware/drivers/m66591.c b/firmware/drivers/m66591.c index 000e4582e1..d09b269f33 100644 --- a/firmware/drivers/m66591.c +++ b/firmware/drivers/m66591.c @@ -659,13 +659,13 @@ int usb_drv_request_endpoint(int type, int dir) { } } else if (type == USB_ENDPOINT_XFER_INT) { ep=5; - - pipecfg |= 1<<13; - - while(M66591_eps[ep].busy && ep++<7); - - /* If this reached 7 the endpoints were all busy */ - if(ep==7) { + + pipecfg |= 1<<13; + + while(M66591_eps[ep].busy && ++ep<USB_NUM_ENDPOINTS); + + /* If this reached USB_NUM_ENDPOINTS the endpoints were all busy */ + if(ep==USB_NUM_ENDPOINTS) { logf("mxx: ep %d busy", ep); return -1; } |