diff options
author | Peter D'Hoye <peter.dhoye@gmail.com> | 2006-06-14 23:36:47 +0000 |
---|---|---|
committer | Peter D'Hoye <peter.dhoye@gmail.com> | 2006-06-14 23:36:47 +0000 |
commit | df686b89e700111a199dc2551813e1e349d64b26 (patch) | |
tree | 3d3349458efe71a4b23d6c2d5ab475604ce60861 /firmware/drivers/i2c-coldfire.c | |
parent | 5db5e6589b1fd62390448beadb15e16a8c52139c (diff) | |
download | rockbox-df686b89e700111a199dc2551813e1e349d64b26.tar.gz rockbox-df686b89e700111a199dc2551813e1e349d64b26.zip |
Tweaks to reduce an iriver recording glitch to a minimum. Removed yields from i2c code as a means to shorten the duration, rearranged order of changing to always cause dips and never peaks. Also some code policing.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10122 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/i2c-coldfire.c')
-rw-r--r-- | firmware/drivers/i2c-coldfire.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/firmware/drivers/i2c-coldfire.c b/firmware/drivers/i2c-coldfire.c index a9c3931d36..47aeba757f 100644 --- a/firmware/drivers/i2c-coldfire.c +++ b/firmware/drivers/i2c-coldfire.c | |||
@@ -120,10 +120,7 @@ int i2c_write_byte(int device, unsigned char data) | |||
120 | 120 | ||
121 | /* Wait for bus busy */ | 121 | /* Wait for bus busy */ |
122 | while (!(regs[O_MBSR] & IBB) && count < MAX_LOOP) | 122 | while (!(regs[O_MBSR] & IBB) && count < MAX_LOOP) |
123 | { | ||
124 | yield(); | ||
125 | count++; | 123 | count++; |
126 | } | ||
127 | 124 | ||
128 | if (count >= MAX_LOOP) | 125 | if (count >= MAX_LOOP) |
129 | return -1; | 126 | return -1; |
@@ -132,10 +129,7 @@ int i2c_write_byte(int device, unsigned char data) | |||
132 | 129 | ||
133 | /* Wait for interrupt flag */ | 130 | /* Wait for interrupt flag */ |
134 | while (!(regs[O_MBSR] & IFF) && count < MAX_LOOP) | 131 | while (!(regs[O_MBSR] & IFF) && count < MAX_LOOP) |
135 | { | ||
136 | yield(); | ||
137 | count++; | 132 | count++; |
138 | } | ||
139 | 133 | ||
140 | if (count >= MAX_LOOP) | 134 | if (count >= MAX_LOOP) |
141 | return -2; | 135 | return -2; |
@@ -160,10 +154,7 @@ int i2c_gen_start(int device) | |||
160 | 154 | ||
161 | /* Wait for bus to become free */ | 155 | /* Wait for bus to become free */ |
162 | while ((regs[O_MBSR] & IBB) && (count < MAX_LOOP)) | 156 | while ((regs[O_MBSR] & IBB) && (count < MAX_LOOP)) |
163 | { | ||
164 | yield(); | ||
165 | count++; | 157 | count++; |
166 | } | ||
167 | 158 | ||
168 | if (count >= MAX_LOOP) | 159 | if (count >= MAX_LOOP) |
169 | return -1; | 160 | return -1; |