1
0
Fork 0
forked from len0rd/rockbox

set/clear port bits with atomic instructions instead of read-modify-write, saves time+space, allows port usage in ISR

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4026 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jörg Hohensohn 2003-11-07 21:03:41 +00:00
parent 7c3e9b1fba
commit 7ec1c45d79

View file

@ -72,10 +72,14 @@ static void usb_enable(bool on)
#endif #endif
if(on) if(on)
PADR &= ~0x400; /* enable USB */ {
and_b(~0x04, &PADRH); /* enable USB */
}
else else
PADR |= 0x400; {
PAIOR |= 0x400; or_b(0x04, &PADRH);
}
or_b(0x04, &PAIORH);
} }
static void usb_slave_mode(bool on) static void usb_slave_mode(bool on)