summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/export/config/sansafuzev2.h2
-rw-r--r--firmware/target/arm/as3525/sansa-fuzev2/lcd-fuzev2.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/firmware/export/config/sansafuzev2.h b/firmware/export/config/sansafuzev2.h
index 88d7650ca3..5db6bb9ec4 100644
--- a/firmware/export/config/sansafuzev2.h
+++ b/firmware/export/config/sansafuzev2.h
@@ -86,7 +86,7 @@
86#define LCD_WIDTH 220 86#define LCD_WIDTH 220
87#define LCD_HEIGHT 176 87#define LCD_HEIGHT 176
88#define LCD_DEPTH 16 /* 65536 colours */ 88#define LCD_DEPTH 16 /* 65536 colours */
89#define LCD_PIXELFORMAT RGB565 /* rgb565 */ 89#define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 swapped */
90 90
91 91
92/* AS3514 or newer */ 92/* AS3514 or newer */
diff --git a/firmware/target/arm/as3525/sansa-fuzev2/lcd-fuzev2.c b/firmware/target/arm/as3525/sansa-fuzev2/lcd-fuzev2.c
index b337a14eac..618d242c4a 100644
--- a/firmware/target/arm/as3525/sansa-fuzev2/lcd-fuzev2.c
+++ b/firmware/target/arm/as3525/sansa-fuzev2/lcd-fuzev2.c
@@ -133,7 +133,7 @@ static void dbop_write_data(const int16_t* p_bytes, int count)
133 { /* need to do a single 16bit write beforehand if the address is 133 { /* need to do a single 16bit write beforehand if the address is
134 * not word aligned or count is 1, switch to 16bit mode if needed */ 134 * not word aligned or count is 1, switch to 16bit mode if needed */
135 dbop_set_mode(16); 135 dbop_set_mode(16);
136 DBOP_DOUT16 = swap16(*p_bytes++); 136 DBOP_DOUT16 = *p_bytes++;
137 if (!(--count)) 137 if (!(--count))
138 return; 138 return;
139 } 139 }
@@ -146,7 +146,7 @@ static void dbop_write_data(const int16_t* p_bytes, int count)
146 146
147 while (count > 1) 147 while (count > 1)
148 { 148 {
149 DBOP_DOUT32 = swap_odd_even32(*data++); 149 DBOP_DOUT32 = *data++;
150 count -= 2; 150 count -= 2;
151 151
152 /* Wait if push fifo is full */ 152 /* Wait if push fifo is full */
@@ -179,7 +179,7 @@ static void lcd_write_cmd(unsigned short cmd)
179 179
180static void lcd_write_reg(int reg, int value) 180static void lcd_write_reg(int reg, int value)
181{ 181{
182 int16_t data = value; 182 int16_t data = swap16(value);
183 lcd_write_cmd(reg); 183 lcd_write_cmd(reg);
184 dbop_write_data(&data, 1); 184 dbop_write_data(&data, 1);
185} 185}