With a max delay of 17 seconds before overflow happens limiting to unsigned short shouldn't be necessary.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26939 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Tobias Diedrich 2010-06-18 20:04:16 +00:00
parent 94f18b1f9f
commit 62622277dc
2 changed files with 3 additions and 2 deletions

View file

@ -326,7 +326,8 @@ int system_memory_guard(int newmode)
return 0;
}
void udelay(unsigned short usecs)
/* usecs may be at most 2^32/248 (17 seconds) for 248MHz max cpu freq */
void udelay(unsigned usecs)
{
unsigned cycles_per_usec;
unsigned delay;

View file

@ -49,5 +49,5 @@ extern int c200v2_variant;
#define TIMER_PERIOD (KERNEL_TIMER_FREQ/HZ)
#endif
void udelay(unsigned short usecs);
void udelay(unsigned usecs);
#endif /* SYSTEM_TARGET_H */