mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-22 11:32:41 -05:00
Implement udelay() for S5L870x. Exchange sleep() with udelay() during CPU voltage scaling. Voltage scaling was measured stable with 50us delay, to have some headroom we use 100us.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28606 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d1302940b9
commit
e464656b88
2 changed files with 8 additions and 1 deletions
|
|
@ -38,4 +38,10 @@
|
|||
#define inw(a) (*(volatile unsigned short *) (a))
|
||||
#define outw(a,b) (*(volatile unsigned short *) (b) = (a))
|
||||
|
||||
static inline void udelay(unsigned usecs)
|
||||
{
|
||||
unsigned stop = USEC_TIMER + usecs;
|
||||
while (TIME_BEFORE(USEC_TIMER, stop));
|
||||
}
|
||||
|
||||
#endif /* SYSTEM_TARGET_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue