diff options
author | wdenk <wdenk> | 2005-04-07 22:36:40 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2005-04-07 22:36:40 +0000 |
commit | b77fad3b25402559247faac95bc23bd2981f0d11 (patch) | |
tree | 89c38479fc5890b76a73e943f77430491e864253 /cpu | |
parent | 7ec25502382e6097f0d8d31a3105acc3b159b0d6 (diff) |
* Patch by Steven Scholz, 07 Apr 2005:
Add i2c_reg_write() and i2c_reg_write() for at91rm9200 I2C
* Patch by Steven Scholz, 07 Apr 2005:
Fix compiler warning in altera.c
* Patch by Ladislav Michl, 06 Apr 2005:
Fix voiceblue configuration.
Diffstat (limited to 'cpu')
-rw-r--r-- | cpu/arm920t/at91rm9200/i2c.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cpu/arm920t/at91rm9200/i2c.c b/cpu/arm920t/at91rm9200/i2c.c index 433dd32a231..274327548b4 100644 --- a/cpu/arm920t/at91rm9200/i2c.c +++ b/cpu/arm920t/at91rm9200/i2c.c @@ -189,4 +189,19 @@ i2c_init(int speed, int slaveaddr) debug ("Found AT91 i2c\n"); return; } + +uchar i2c_reg_read(uchar i2c_addr, uchar reg) +{ + char buf; + + i2c_read(i2c_addr, reg, 1, &buf, 1); + + return(buf); +} + +void i2c_reg_write(uchar i2c_addr, uchar reg, uchar val) +{ + i2c_write(i2c_addr, reg, 1, &val, 1); +} + #endif /* CONFIG_HARD_I2C */ |