cowond2: make sure the i2c delay loop code is actually generated by the eabi compiler.
This fix adds one nop instruction per loop (there were 3 before) and so i2c will be slightly slower, but this hardly a problem. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26850 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
7ee0983a87
commit
1d4dc9b3b0
1 changed files with 3 additions and 1 deletions
|
@ -28,8 +28,10 @@
|
|||
static inline void delay_loop(void)
|
||||
{
|
||||
unsigned long x;
|
||||
for (x = (unsigned)(FREQ>>22); x; x--);
|
||||
for (x = (unsigned)(FREQ>>22); x; x--)
|
||||
asm volatile("nop");
|
||||
}
|
||||
|
||||
#define DELAY delay_loop()
|
||||
|
||||
static struct mutex i2c_mtx;
|
||||
|
|
Loading…
Reference in a new issue