From c36d7768c539921754dd26ded343a08e11ccc0f0 Mon Sep 17 00:00:00 2001 From: Roman Artiukhin Date: Mon, 19 Feb 2024 13:59:51 +0200 Subject: Sansa e200v2: bootloader: fit size Max allowed size: 120860 Old thumb build: 128494 New thumb build: 118514 (fits!) Disabled: Logo; alpha blending capabilities for bitmaps; Arm stack unwinder (backtrace); Related forum discussion: https://forums.rockbox.org/index.php/topic,54768.0.html Fixes FS#12380 Change-Id: I978720d795cb0ef5169103e467cf8386c21d8e93 --- firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c') 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) void lcd_set_invert_display(bool yesno) { +#ifdef HAVE_LCD_INVERT r_disp_control_rev = yesno ? R_DISP_CONTROL_REV : R_DISP_CONTROL_NORMAL; @@ -156,9 +157,13 @@ void lcd_set_invert_display(bool yesno) { lcd_write_reg(R_DISP_CONTROL1, 0x0033 | r_disp_control_rev); } +#else + (void)yesno; +#endif } +#ifdef HAVE_LCD_FLIP static bool display_flipped = false; /* turn the display upside down */ @@ -169,15 +174,19 @@ void lcd_set_flip(bool yesno) r_entry_mode = yesno ? R_ENTRY_MODE_HORZ_FLIPPED : R_ENTRY_MODE_HORZ_NORMAL; } +#endif // HAVE_LCD_FLIP static void lcd_window(int xmin, int ymin, int xmax, int ymax) { +#ifdef HAVE_LCD_FLIP if (!display_flipped) +#endif { lcd_write_reg(R_HORIZ_RAM_ADDR_POS, (xmax << 8) | xmin); lcd_write_reg(R_VERT_RAM_ADDR_POS, (ymax << 8) | ymin); lcd_write_reg(R_RAM_ADDR_SET, (ymin << 8) | xmin); } +#ifdef HAVE_LCD_FLIP else { lcd_write_reg(R_HORIZ_RAM_ADDR_POS, @@ -187,6 +196,7 @@ static void lcd_window(int xmin, int ymin, int xmax, int ymax) lcd_write_reg(R_RAM_ADDR_SET, ((LCD_HEIGHT-1 - ymin) << 8) | (LCD_WIDTH-1 - xmin)); } +#endif // HAVE_LCD_FLIP } static void _display_on(void) @@ -431,7 +441,7 @@ void lcd_blit_yuv(unsigned char * const src[3], } } -#endif +#endif /* !BOOTLOADER */ /* Update the display. -- cgit v1.2.3