1
0
Fork 0
forked from len0rd/rockbox

Correct the name of a flag. No functional change.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16708 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2008-03-18 22:48:26 +00:00
parent 6deb9f31ff
commit eb0a7a3318
3 changed files with 5 additions and 5 deletions

View file

@ -57,7 +57,7 @@ void i2c_adjust_prescale(int multiplier);
#define IBB (1 << 5) /* Bus Busy */ #define IBB (1 << 5) /* Bus Busy */
#define IAL (1 << 4) /* Arbitration Lost */ #define IAL (1 << 4) /* Arbitration Lost */
#define SRW (1 << 2) /* Slave R/W */ #define SRW (1 << 2) /* Slave R/W */
#define IFF (1 << 1) /* I2C Interrupt */ #define IIF (1 << 1) /* I2C Interrupt */
#define RXAK (1 << 0) /* No Ack bit */ #define RXAK (1 << 0) /* No Ack bit */
/* MBCR - Control register */ /* MBCR - Control register */

View file

@ -195,17 +195,17 @@ int i2c_start(volatile unsigned char *iface)
int i2c_wait_for_slave(volatile unsigned char *iface) int i2c_wait_for_slave(volatile unsigned char *iface)
{ {
int j = MAX_LOOP; int j = MAX_LOOP;
while (--j && ! (iface[O_MBSR] & IFF)) while (--j && ! (iface[O_MBSR] & IIF))
; ;
if (!j) if (!j)
{ {
logf("i2c: IFF not set (iface=%08lX)", (uintptr_t)iface); logf("i2c: IIF not set (iface=%08lX)", (uintptr_t)iface);
i2c_stop(iface); i2c_stop(iface);
return -2; return -2;
} }
/* Clear interrupt flag */ /* Clear interrupt flag */
iface[O_MBSR] &= ~IFF; iface[O_MBSR] &= ~IIF;
return 0; return 0;
} }

View file

@ -49,7 +49,7 @@ void IIC2(void)
{ {
static int bytenum = 0; static int bytenum = 0;
MBSR2 &= ~IFF; /* Clear interrupt flag */ MBSR2 &= ~IIF; /* Clear interrupt flag */
if (MBSR2 & IAL) /* Arbitration lost - shouldn't never happen */ if (MBSR2 & IAL) /* Arbitration lost - shouldn't never happen */
{ {