diff options
author | Barry Wardell <rockbox@barrywardell.net> | 2007-01-27 14:22:24 +0000 |
---|---|---|
committer | Barry Wardell <rockbox@barrywardell.net> | 2007-01-27 14:22:24 +0000 |
commit | 5e765b2ea2962b86c460a67968d4977f3aa55ca3 (patch) | |
tree | e66a22992e7d17c6856cff560cf70fd6a0e378b4 /firmware/export/i2c-pp5020.h | |
parent | 6820ed1f7f13347c8134b4678ce6c4d403482681 (diff) | |
download | rockbox-5e765b2ea2962b86c460a67968d4977f3aa55ca3.tar.gz rockbox-5e765b2ea2962b86c460a67968d4977f3aa55ca3.zip |
Clean up PP5020 I2C code (no functional changes):
Move into target tree.
Use #defines instead of inb/outb.
Whitespace cleanup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12123 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/i2c-pp5020.h')
-rw-r--r-- | firmware/export/i2c-pp5020.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/firmware/export/i2c-pp5020.h b/firmware/export/i2c-pp5020.h index b8b10d6388..c52d07d24f 100644 --- a/firmware/export/i2c-pp5020.h +++ b/firmware/export/i2c-pp5020.h | |||
@@ -25,6 +25,17 @@ | |||
25 | #ifndef _I2C_PP5020_H | 25 | #ifndef _I2C_PP5020_H |
26 | #define _I2C_PP5020_H | 26 | #define _I2C_PP5020_H |
27 | 27 | ||
28 | #define I2C_CTRL (*(volatile unsigned char*)(I2C_BASE+0x00)) | ||
29 | #define I2C_ADDR (*(volatile unsigned char*)(I2C_BASE+0x04)) | ||
30 | #define I2C_DATA(X) (*(volatile unsigned char*)(I2C_BASE+0xc+(4*X))) | ||
31 | #define I2C_STATUS (*(volatile unsigned char*)(I2C_BASE+0x1c)) | ||
32 | |||
33 | /* I2C_CTRL bit definitions */ | ||
34 | #define I2C_SEND 0x80 | ||
35 | |||
36 | /* I2C_STATUS bit definitions */ | ||
37 | #define I2C_BUSY (1<<6) | ||
38 | |||
28 | /* TODO: Fully implement i2c driver */ | 39 | /* TODO: Fully implement i2c driver */ |
29 | 40 | ||
30 | void i2c_init(void); | 41 | void i2c_init(void); |