diff options
Diffstat (limited to 'firmware/target/arm')
-rw-r--r-- | firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c | 12 | ||||
-rw-r--r-- | firmware/target/arm/system-arm.c | 4 |
2 files changed, 15 insertions, 1 deletions
diff --git a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c index f69ad48793..1344ea6fa8 100644 --- a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c +++ b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c | |||
@@ -149,6 +149,7 @@ static void lcd_write_reg(int reg, int value) | |||
149 | 149 | ||
150 | void lcd_set_invert_display(bool yesno) | 150 | void lcd_set_invert_display(bool yesno) |
151 | { | 151 | { |
152 | #ifdef HAVE_LCD_INVERT | ||
152 | r_disp_control_rev = yesno ? R_DISP_CONTROL_REV : | 153 | r_disp_control_rev = yesno ? R_DISP_CONTROL_REV : |
153 | R_DISP_CONTROL_NORMAL; | 154 | R_DISP_CONTROL_NORMAL; |
154 | 155 | ||
@@ -156,9 +157,13 @@ void lcd_set_invert_display(bool yesno) | |||
156 | { | 157 | { |
157 | lcd_write_reg(R_DISP_CONTROL1, 0x0033 | r_disp_control_rev); | 158 | lcd_write_reg(R_DISP_CONTROL1, 0x0033 | r_disp_control_rev); |
158 | } | 159 | } |
160 | #else | ||
161 | (void)yesno; | ||
162 | #endif | ||
159 | 163 | ||
160 | } | 164 | } |
161 | 165 | ||
166 | #ifdef HAVE_LCD_FLIP | ||
162 | static bool display_flipped = false; | 167 | static bool display_flipped = false; |
163 | 168 | ||
164 | /* turn the display upside down */ | 169 | /* turn the display upside down */ |
@@ -169,15 +174,19 @@ void lcd_set_flip(bool yesno) | |||
169 | r_entry_mode = yesno ? R_ENTRY_MODE_HORZ_FLIPPED : | 174 | r_entry_mode = yesno ? R_ENTRY_MODE_HORZ_FLIPPED : |
170 | R_ENTRY_MODE_HORZ_NORMAL; | 175 | R_ENTRY_MODE_HORZ_NORMAL; |
171 | } | 176 | } |
177 | #endif // HAVE_LCD_FLIP | ||
172 | 178 | ||
173 | static void lcd_window(int xmin, int ymin, int xmax, int ymax) | 179 | static void lcd_window(int xmin, int ymin, int xmax, int ymax) |
174 | { | 180 | { |
181 | #ifdef HAVE_LCD_FLIP | ||
175 | if (!display_flipped) | 182 | if (!display_flipped) |
183 | #endif | ||
176 | { | 184 | { |
177 | lcd_write_reg(R_HORIZ_RAM_ADDR_POS, (xmax << 8) | xmin); | 185 | lcd_write_reg(R_HORIZ_RAM_ADDR_POS, (xmax << 8) | xmin); |
178 | lcd_write_reg(R_VERT_RAM_ADDR_POS, (ymax << 8) | ymin); | 186 | lcd_write_reg(R_VERT_RAM_ADDR_POS, (ymax << 8) | ymin); |
179 | lcd_write_reg(R_RAM_ADDR_SET, (ymin << 8) | xmin); | 187 | lcd_write_reg(R_RAM_ADDR_SET, (ymin << 8) | xmin); |
180 | } | 188 | } |
189 | #ifdef HAVE_LCD_FLIP | ||
181 | else | 190 | else |
182 | { | 191 | { |
183 | lcd_write_reg(R_HORIZ_RAM_ADDR_POS, | 192 | lcd_write_reg(R_HORIZ_RAM_ADDR_POS, |
@@ -187,6 +196,7 @@ static void lcd_window(int xmin, int ymin, int xmax, int ymax) | |||
187 | lcd_write_reg(R_RAM_ADDR_SET, | 196 | lcd_write_reg(R_RAM_ADDR_SET, |
188 | ((LCD_HEIGHT-1 - ymin) << 8) | (LCD_WIDTH-1 - xmin)); | 197 | ((LCD_HEIGHT-1 - ymin) << 8) | (LCD_WIDTH-1 - xmin)); |
189 | } | 198 | } |
199 | #endif // HAVE_LCD_FLIP | ||
190 | } | 200 | } |
191 | 201 | ||
192 | static void _display_on(void) | 202 | static void _display_on(void) |
@@ -431,7 +441,7 @@ void lcd_blit_yuv(unsigned char * const src[3], | |||
431 | } | 441 | } |
432 | } | 442 | } |
433 | 443 | ||
434 | #endif | 444 | #endif /* !BOOTLOADER */ |
435 | 445 | ||
436 | 446 | ||
437 | /* Update the display. | 447 | /* Update the display. |
diff --git a/firmware/target/arm/system-arm.c b/firmware/target/arm/system-arm.c index 74df5ed277..41d0cce723 100644 --- a/firmware/target/arm/system-arm.c +++ b/firmware/target/arm/system-arm.c | |||
@@ -145,11 +145,15 @@ void NORETURN_ATTR UIE(unsigned int pc, unsigned int num) | |||
145 | } /* num == 1 || num == 2 // prefetch/data abort */ | 145 | } /* num == 1 || num == 2 // prefetch/data abort */ |
146 | #endif /* !defined(CPU_ARM7TDMI */ | 146 | #endif /* !defined(CPU_ARM7TDMI */ |
147 | 147 | ||
148 | #ifdef HAVE_RB_BACKTRACE | ||
148 | if (!triggered) | 149 | if (!triggered) |
149 | { | 150 | { |
150 | triggered = true; | 151 | triggered = true; |
151 | rb_backtrace(pc, __get_sp(), &line); | 152 | rb_backtrace(pc, __get_sp(), &line); |
152 | } | 153 | } |
154 | #else | ||
155 | (void)triggered; | ||
156 | #endif | ||
153 | 157 | ||
154 | lcd_update(); | 158 | lcd_update(); |
155 | 159 | ||