summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2008-03-20 16:45:44 +0000
committerJens Arnold <amiconn@rockbox.org>2008-03-20 16:45:44 +0000
commit0b3f2411879f26127bf9bc128fafca6a79c6b932 (patch)
tree008dbc1406afc0cb769b2d409b61898a58b73081
parented8445f20527827093128db8d59d7ccb2cf9e385 (diff)
downloadrockbox-0b3f2411879f26127bf9bc128fafca6a79c6b932.tar.gz
rockbox-0b3f2411879f26127bf9bc128fafca6a79c6b932.zip
Don't slow down I2C more than necessary when clock-stretching (rather old bug...)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16720 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/drivers/i2c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/drivers/i2c.c b/firmware/drivers/i2c.c
index fe4114e34d..5cfa3dca97 100644
--- a/firmware/drivers/i2c.c
+++ b/firmware/drivers/i2c.c
@@ -121,7 +121,7 @@ void i2c_ack(int bit)
121 121
122 SCL_INPUT; /* Set the clock to input */ 122 SCL_INPUT; /* Set the clock to input */
123 while(!SCL) /* and wait for the MAS to release it */ 123 while(!SCL) /* and wait for the MAS to release it */
124 sleep(1); 124 sleep(0);
125 125
126 DELAY; 126 DELAY;
127 SCL_OUTPUT; 127 SCL_OUTPUT;
@@ -143,7 +143,7 @@ int i2c_getack(void)
143 SDA_INPUT; /* And set to input */ 143 SDA_INPUT; /* And set to input */
144 SCL_INPUT; /* Set the clock to input */ 144 SCL_INPUT; /* Set the clock to input */
145 while(!SCL) /* and wait for the MAS to release it */ 145 while(!SCL) /* and wait for the MAS to release it */
146 sleep(1); 146 sleep(0);
147 147
148 if (SDA) 148 if (SDA)
149 /* ack failed */ 149 /* ack failed */