summaryrefslogtreecommitdiff
path: root/firmware/drivers/i2c.c
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2006-09-16 16:18:11 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2006-09-16 16:18:11 +0000
commita85044bf9eaa0a7206c1978d3cfd57ab2d7fae2f (patch)
treea30695ed540bf32365d577f46398f712c7a494c4 /firmware/drivers/i2c.c
parentbaf5494341cdd6cdb9590e21d429920b9bc4a2c6 (diff)
downloadrockbox-a85044bf9eaa0a7206c1978d3cfd57ab2d7fae2f.tar.gz
rockbox-a85044bf9eaa0a7206c1978d3cfd57ab2d7fae2f.zip
New scheduler, with priorities for swcodec platforms. Frequent task
switching should be more efficient and tasks are stored in linked lists to eliminate unnecessary task switching to improve performance. Audio should no longer skip on swcodec targets caused by too CPU hungry UI thread or background threads. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10958 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/i2c.c')
-rw-r--r--firmware/drivers/i2c.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/firmware/drivers/i2c.c b/firmware/drivers/i2c.c
index 71cb9cf8b0..2b439c23ad 100644
--- a/firmware/drivers/i2c.c
+++ b/firmware/drivers/i2c.c
@@ -145,8 +145,7 @@ void i2c_ack(int bit)
145 145
146 SCL_INPUT; /* Set the clock to input */ 146 SCL_INPUT; /* Set the clock to input */
147 while(!SCL) /* and wait for the MAS to release it */ 147 while(!SCL) /* and wait for the MAS to release it */
148 sleep_thread(); 148 sleep_thread(1);
149 wake_up_thread();
150 149
151 DELAY; 150 DELAY;
152 SCL_OUTPUT; 151 SCL_OUTPUT;
@@ -168,8 +167,7 @@ int i2c_getack(void)
168 SDA_INPUT; /* And set to input */ 167 SDA_INPUT; /* And set to input */
169 SCL_INPUT; /* Set the clock to input */ 168 SCL_INPUT; /* Set the clock to input */
170 while(!SCL) /* and wait for the MAS to release it */ 169 while(!SCL) /* and wait for the MAS to release it */
171 sleep_thread(); 170 sleep_thread(1);
172 wake_up_thread();
173 171
174 if (SDA) 172 if (SDA)
175 /* ack failed */ 173 /* ack failed */