diff options
Diffstat (limited to 'firmware/target/coldfire')
-rw-r--r-- | firmware/target/coldfire/iaudio/lcd-remote-iaudio.c | 45 |
1 files changed, 20 insertions, 25 deletions
diff --git a/firmware/target/coldfire/iaudio/lcd-remote-iaudio.c b/firmware/target/coldfire/iaudio/lcd-remote-iaudio.c index 139ebbc2a3..939f7347c4 100644 --- a/firmware/target/coldfire/iaudio/lcd-remote-iaudio.c +++ b/firmware/target/coldfire/iaudio/lcd-remote-iaudio.c | |||
@@ -172,77 +172,72 @@ static inline void _write_fast(unsigned data) | |||
172 | "swap %[data] \n" /* Shift data to upper byte */ | 172 | "swap %[data] \n" /* Shift data to upper byte */ |
173 | "lsl.l #8, %[data] \n" | 173 | "lsl.l #8, %[data] \n" |
174 | 174 | ||
175 | "move.l %%d0, %%d1 \n" /* precalculate opposite state of clock line */ | ||
176 | "eor.l %[cbit], %%d1 \n" | ||
177 | |||
175 | "lsl.l #1,%[data] \n" /* Shift out MSB */ | 178 | "lsl.l #1,%[data] \n" /* Shift out MSB */ |
176 | "bcc.s 1f \n" | 179 | "bcc.s 1f \n" |
177 | "eor.l %[dbit], %%d0 \n" /* 1: Flip data bit */ | 180 | "eor.l %[dbit], %%d0 \n" /* 1: Flip data bit */ |
181 | "eor.l %[dbit], %%d1 \n" /* for both clock states */ | ||
178 | "1: \n" | 182 | "1: \n" |
179 | "eor.l %[cbit], %%d0 \n" /* Flip clock bit */ | 183 | "move.l %%d1, (%[gpo0]) \n" /* Output new state and set CLK */ |
180 | "move.l %%d0, (%[gpo0]) \n" /* Output new state */ | 184 | "move.l %%d0, (%[gpo0]) \n" /* reset CLK */ |
181 | "eor.l %[cbit], %%d0 \n" /* Flip clock bit */ | ||
182 | "move.l %%d0, (%[gpo0]) \n" /* Output new state */ | ||
183 | 185 | ||
184 | "lsl.l #1,%[data] \n" /* ..unrolled.. */ | 186 | "lsl.l #1,%[data] \n" /* ..unrolled.. */ |
185 | "bcc.s 1f \n" | 187 | "bcc.s 1f \n" |
186 | "eor.l %[dbit], %%d0 \n" | 188 | "eor.l %[dbit], %%d0 \n" |
189 | "eor.l %[dbit], %%d1 \n" | ||
187 | "1: \n" | 190 | "1: \n" |
188 | "eor.l %[cbit], %%d0 \n" | 191 | "move.l %%d1, (%[gpo0]) \n" |
189 | "move.l %%d0, (%[gpo0]) \n" | ||
190 | "eor.l %[cbit], %%d0 \n" | ||
191 | "move.l %%d0, (%[gpo0]) \n" | 192 | "move.l %%d0, (%[gpo0]) \n" |
192 | 193 | ||
193 | "lsl.l #1,%[data] \n" | 194 | "lsl.l #1,%[data] \n" |
194 | "bcc.s 1f \n" | 195 | "bcc.s 1f \n" |
195 | "eor.l %[dbit], %%d0 \n" | 196 | "eor.l %[dbit], %%d0 \n" |
197 | "eor.l %[dbit], %%d1 \n" | ||
196 | "1: \n" | 198 | "1: \n" |
197 | "eor.l %[cbit], %%d0 \n" | 199 | "move.l %%d1, (%[gpo0]) \n" |
198 | "move.l %%d0, (%[gpo0]) \n" | ||
199 | "eor.l %[cbit], %%d0 \n" | ||
200 | "move.l %%d0, (%[gpo0]) \n" | 200 | "move.l %%d0, (%[gpo0]) \n" |
201 | 201 | ||
202 | "lsl.l #1,%[data] \n" | 202 | "lsl.l #1,%[data] \n" |
203 | "bcc.s 1f \n" | 203 | "bcc.s 1f \n" |
204 | "eor.l %[dbit], %%d0 \n" | 204 | "eor.l %[dbit], %%d0 \n" |
205 | "eor.l %[dbit], %%d1 \n" | ||
205 | "1: \n" | 206 | "1: \n" |
206 | "eor.l %[cbit], %%d0 \n" | 207 | "move.l %%d1, (%[gpo0]) \n" |
207 | "move.l %%d0, (%[gpo0]) \n" | ||
208 | "eor.l %[cbit], %%d0 \n" | ||
209 | "move.l %%d0, (%[gpo0]) \n" | 208 | "move.l %%d0, (%[gpo0]) \n" |
210 | 209 | ||
211 | "lsl.l #1,%[data] \n" | 210 | "lsl.l #1,%[data] \n" |
212 | "bcc.s 1f \n" | 211 | "bcc.s 1f \n" |
213 | "eor.l %[dbit], %%d0 \n" | 212 | "eor.l %[dbit], %%d0 \n" |
213 | "eor.l %[dbit], %%d1 \n" | ||
214 | "1: \n" | 214 | "1: \n" |
215 | "eor.l %[cbit], %%d0 \n" | 215 | "move.l %%d1, (%[gpo0]) \n" |
216 | "move.l %%d0, (%[gpo0]) \n" | ||
217 | "eor.l %[cbit], %%d0 \n" | ||
218 | "move.l %%d0, (%[gpo0]) \n" | 216 | "move.l %%d0, (%[gpo0]) \n" |
219 | 217 | ||
220 | "lsl.l #1,%[data] \n" | 218 | "lsl.l #1,%[data] \n" |
221 | "bcc.s 1f \n" | 219 | "bcc.s 1f \n" |
222 | "eor.l %[dbit], %%d0 \n" | 220 | "eor.l %[dbit], %%d0 \n" |
221 | "eor.l %[dbit], %%d1 \n" | ||
223 | "1: \n" | 222 | "1: \n" |
224 | "eor.l %[cbit], %%d0 \n" | 223 | "move.l %%d1, (%[gpo0]) \n" |
225 | "move.l %%d0, (%[gpo0]) \n" | ||
226 | "eor.l %[cbit], %%d0 \n" | ||
227 | "move.l %%d0, (%[gpo0]) \n" | 224 | "move.l %%d0, (%[gpo0]) \n" |
228 | 225 | ||
229 | "lsl.l #1,%[data] \n" | 226 | "lsl.l #1,%[data] \n" |
230 | "bcc.s 1f \n" | 227 | "bcc.s 1f \n" |
231 | "eor.l %[dbit], %%d0 \n" | 228 | "eor.l %[dbit], %%d0 \n" |
229 | "eor.l %[dbit], %%d1 \n" | ||
232 | "1: \n" | 230 | "1: \n" |
233 | "eor.l %[cbit], %%d0 \n" | 231 | "move.l %%d1, (%[gpo0]) \n" |
234 | "move.l %%d0, (%[gpo0]) \n" | ||
235 | "eor.l %[cbit], %%d0 \n" | ||
236 | "move.l %%d0, (%[gpo0]) \n" | 232 | "move.l %%d0, (%[gpo0]) \n" |
237 | 233 | ||
238 | "lsl.l #1,%[data] \n" | 234 | "lsl.l #1,%[data] \n" |
239 | "bcc.s 1f \n" | 235 | "bcc.s 1f \n" |
240 | "eor.l %[dbit], %%d0 \n" | 236 | "eor.l %[dbit], %%d0 \n" |
237 | "eor.l %[dbit], %%d1 \n" | ||
241 | "1: \n" | 238 | "1: \n" |
242 | "eor.l %[cbit], %%d0 \n" | 239 | "move.l %%d1, (%[gpo0]) \n" |
243 | "move.l %%d0, (%[gpo0]) \n" | 240 | "move.l %%d0, (%[gpo0]) \n" |
244 | "eor.l %[cbit], %%d0 \n" | ||
245 | "move.l %%d0, (%[gpo0]) \n" | ||
246 | 241 | ||
247 | "move.w %%d3, %%sr \n" /* Restore interrupt level */ | 242 | "move.w %%d3, %%sr \n" /* Restore interrupt level */ |
248 | : /* outputs */ | 243 | : /* outputs */ |