diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-05-03 13:43:26 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-05-03 13:43:26 +0000 |
commit | a6b31f18c89029c6f19609dc39cbb0abc59daeed (patch) | |
tree | 31c42391fd7b0a20c3203989ef9d7d776d0d7af4 /firmware/target/arm/tms320dm320/i2c-dm320.c | |
parent | ea664e06476cb572bab2eadbb9c060902a95a34a (diff) |
1) add support for ata-as-arm
2) remove obsolete audio-creativezvm.c
3) fix registers in i2c-dm320.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17316 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/tms320dm320/i2c-dm320.c')
-rwxr-xr-x | firmware/target/arm/tms320dm320/i2c-dm320.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/firmware/target/arm/tms320dm320/i2c-dm320.c b/firmware/target/arm/tms320dm320/i2c-dm320.c index cb6411e412..a87019c69c 100755 --- a/firmware/target/arm/tms320dm320/i2c-dm320.c +++ b/firmware/target/arm/tms320dm320/i2c-dm320.c @@ -26,7 +26,7 @@ #define I2C_SCS_COND_STOP 0x0002 #define I2C_SCS_XMIT 0x0004 -#define I2C_TX_ACK (1 << 20) +#define I2C_TX_ACK (1 << 8) static struct mutex i2c_mtx; @@ -42,7 +42,12 @@ static inline void i2c_end(void) static inline bool i2c_getack(void) { - return (IO_I2C_RXDATA & 0x100)>>8; + return (IO_I2C_RXDATA >> 8) & 1; +} + +static inline void i2c_ack(void) +{ + IO_I2C_TXDATA |= I2C_TX_ACK; } #define WAIT_FOR_I2C if(IO_I2C_SCS & 0x4){ \ |