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:
Amaury Pouly 2010-06-14 23:01:30 +00:00
parent 7ee0983a87
commit 1d4dc9b3b0

View file

@ -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;