summaryrefslogtreecommitdiffstats
path: root/firmware/target/mips/ingenic_jz47xx/i2c-jz4740.c
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2009-03-09 22:17:37 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2009-03-09 22:17:37 +0000
commit70ab3fca0d5bc9a2cffdef50db0b2fb152cb1892 (patch)
treef2990213a230c884a5d4409d904b8b2867615584 /firmware/target/mips/ingenic_jz47xx/i2c-jz4740.c
parentb1983d21c2dc19c2c3aa4904bfaeabb3ca20092e (diff)
downloadrockbox-70ab3fca0d5bc9a2cffdef50db0b2fb152cb1892.tar.gz
rockbox-70ab3fca0d5bc9a2cffdef50db0b2fb152cb1892.tar.bz2
rockbox-70ab3fca0d5bc9a2cffdef50db0b2fb152cb1892.zip
Onda VX747:
* Fix warnings * Add fake battery level information to make sure Rockbox doesn't shutdown * Enable switching between touch modes by pressing (VOL_DOWN|VOL_UP) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20269 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx/i2c-jz4740.c')
-rw-r--r--firmware/target/mips/ingenic_jz47xx/i2c-jz4740.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/i2c-jz4740.c b/firmware/target/mips/ingenic_jz47xx/i2c-jz4740.c
index b97448f4bb..5df0e90683 100644
--- a/firmware/target/mips/ingenic_jz47xx/i2c-jz4740.c
+++ b/firmware/target/mips/ingenic_jz47xx/i2c-jz4740.c
@@ -74,6 +74,7 @@ static int i2c_put_data(unsigned char data)
return -1;
}
+#if 0
static int i2c_put_data_nack(unsigned char data)
{
unsigned int timeout = TIMEOUT*10;
@@ -86,6 +87,7 @@ static int i2c_put_data_nack(unsigned char data)
return 0;
}
+#endif
static int i2c_get_data(unsigned char *data, int ack)
{
@@ -111,13 +113,17 @@ static int i2c_get_data(unsigned char *data, int ack)
return -1;
}
+void i2c_setclk(unsigned int i2cclk)
+{
+ __i2c_set_clk(__cpm_get_i2sclk(), i2cclk);
+}
+
/*
* I2C interface
*/
void i2c_open(void)
{
- /* TODO */
- //__i2c_set_clk(jz_clocks.extalclk, 10000); /* default 10 KHz */
+ i2c_setclk(10000); /* default 10 KHz */
__i2c_enable();
}
@@ -127,12 +133,6 @@ void i2c_close(void)
__i2c_disable();
}
-void i2c_setclk(unsigned int i2cclk)
-{
- /* TODO */
- //__i2c_set_clk(jz_clocks.extalclk, i2cclk);
-}
-
int i2c_read(int device, unsigned char *buf, int count)
{
int cnt = count;