summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/target/arm/as3525/sansa-fuzev2/lcd-fuzev2.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/firmware/target/arm/as3525/sansa-fuzev2/lcd-fuzev2.c b/firmware/target/arm/as3525/sansa-fuzev2/lcd-fuzev2.c
index 06a1b7f4dd..b337a14eac 100644
--- a/firmware/target/arm/as3525/sansa-fuzev2/lcd-fuzev2.c
+++ b/firmware/target/arm/as3525/sansa-fuzev2/lcd-fuzev2.c
@@ -144,23 +144,9 @@ static void dbop_write_data(const int16_t* p_bytes, int count)
144 dbop_set_mode(32); 144 dbop_set_mode(32);
145 data = (int32_t*)p_bytes; 145 data = (int32_t*)p_bytes;
146 146
147 const unsigned int mask = 0xff00ff;
148 while (count > 1) 147 while (count > 1)
149 { 148 {
150 register unsigned int pixels = *data++; 149 DBOP_DOUT32 = swap_odd_even32(*data++);
151 register unsigned int tmp;
152
153 /* pixels == ABCD */
154 asm(
155 "and %[tmp], %[pixels], %[mask] \n" /* tmp = 0B0D */
156 "and %[pixels], %[pixels], %[mask], lsl #8\n" /* %[pixels] = A0C0 */
157 "mov %[pixels], %[pixels], lsr #8 \n" /* %[pixels] = 0A0C */
158 "orr %[pixels], %[pixels], %[tmp], lsl #8 \n" /* %[pixels] = BADC */
159 : [pixels]"+r"(pixels), [tmp]"=r"(tmp) /* output */
160 : [mask]"r"(mask) /* input */
161 );
162
163 DBOP_DOUT32 = pixels;
164 count -= 2; 150 count -= 2;
165 151
166 /* Wait if push fifo is full */ 152 /* Wait if push fifo is full */