forked from len0rd/rockbox
usb-drv-as3525v2: cosmetics
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31244 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e062c7a6c3
commit
7af94b4427
1 changed files with 5 additions and 5 deletions
|
|
@ -247,13 +247,15 @@ void usb_drv_exit(void)
|
|||
|
||||
static void handle_ep_int(int ep, bool out)
|
||||
{
|
||||
struct usb_endpoint *endpoint = &endpoints[ep][out ? DIR_OUT : DIR_IN];
|
||||
unsigned long sts = DEPINT(ep, out);
|
||||
logf("%s(%d %s): sts = 0x%lx", __func__, ep, out?"OUT":"IN", sts);
|
||||
|
||||
if(sts & DEPINT_ahberr)
|
||||
panicf("usb-drv: ahb error on EP%d %s", ep, out ? "OUT" : "IN");
|
||||
|
||||
if(sts & DEPINT_xfercompl)
|
||||
{
|
||||
struct usb_endpoint *endpoint = &endpoints[ep][out ? DIR_OUT : DIR_IN];
|
||||
if(endpoint->busy)
|
||||
{
|
||||
endpoint->busy = false;
|
||||
|
|
@ -311,11 +313,9 @@ static void handle_ep_int(int ep, bool out)
|
|||
logf(" rt=%x r=%x", ep0_setup_pkt->bRequestType, ep0_setup_pkt->bRequest);
|
||||
|
||||
if(ep0_setup_pkt->bRequestType == USB_TYPE_STANDARD &&
|
||||
ep0_setup_pkt->bRequest == USB_REQ_SET_ADDRESS)
|
||||
{
|
||||
/* Set address */
|
||||
ep0_setup_pkt->bRequest == USB_REQ_SET_ADDRESS)
|
||||
DCFG = (DCFG & ~bitm(DCFG, devadr)) | (ep0_setup_pkt->wValue << DCFG_devadr_bitp);
|
||||
}
|
||||
|
||||
usb_core_control_request(ep0_setup_pkt);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue