forked from len0rd/rockbox
usb-drv-as3525v2.c: cosmetics
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31221 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
bc943a06ba
commit
9c31062f05
1 changed files with 4 additions and 4 deletions
|
@ -748,7 +748,7 @@ int usb_drv_request_endpoint(int type, int dir)
|
||||||
unsigned long mask = ~(bitm(DEPCTL, eptype) | bitm(DEPCTL, mps));
|
unsigned long mask = ~(bitm(DEPCTL, eptype) | bitm(DEPCTL, mps));
|
||||||
|
|
||||||
if(dir == USB_DIR_IN) DIEPCTL(ep) = (DIEPCTL(ep) & mask) | data;
|
if(dir == USB_DIR_IN) DIEPCTL(ep) = (DIEPCTL(ep) & mask) | data;
|
||||||
else DOEPCTL(ep) = (DOEPCTL(ep) & mask) | data;
|
else DOEPCTL(ep) = (DOEPCTL(ep) & mask) | data;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -774,9 +774,9 @@ static int usb_drv_transfer(int ep, void *ptr, int len, bool dir_in, bool blocki
|
||||||
/* disable interrupts to avoid any race */
|
/* disable interrupts to avoid any race */
|
||||||
int oldlevel = disable_irq_save();
|
int oldlevel = disable_irq_save();
|
||||||
|
|
||||||
volatile uint32_t *epctl = dir_in ? &DIEPCTL(ep) : &DOEPCTL(ep);
|
volatile uint32_t *epctl = dir_in ? &DIEPCTL(ep) : &DOEPCTL(ep);
|
||||||
volatile uint32_t *eptsiz = dir_in ? &DIEPTSIZ(ep) : &DOEPTSIZ(ep);
|
volatile uint32_t *eptsiz = dir_in ? &DIEPTSIZ(ep) : &DOEPTSIZ(ep);
|
||||||
const void * volatile * epdma = dir_in ? &DIEPDMA(ep) : &DOEPDMA(ep);
|
const void * volatile * epdma = dir_in ? &DIEPDMA(ep) : &DOEPDMA(ep);
|
||||||
struct usb_endpoint *endpoint = &endpoints[ep][dir_in];
|
struct usb_endpoint *endpoint = &endpoints[ep][dir_in];
|
||||||
#define DEPCTL *epctl
|
#define DEPCTL *epctl
|
||||||
#define DEPTSIZ *eptsiz
|
#define DEPTSIZ *eptsiz
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue