From 5236ca98860a7698c0a768666da20f7418024706 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Thu, 17 Nov 2005 00:37:16 +0000 Subject: [PATCH] Moved some often-used parts of the LCD driver into IRAM. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7921 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/lcd-16bit.c | 8 ++++++-- firmware/drivers/lcd-h300.c | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/firmware/drivers/lcd-16bit.c b/firmware/drivers/lcd-16bit.c index 1aed98e5f6..83c6dc612c 100644 --- a/firmware/drivers/lcd-16bit.c +++ b/firmware/drivers/lcd-16bit.c @@ -37,8 +37,8 @@ /*** globals ***/ fb_data lcd_framebuffer[LCD_HEIGHT][LCD_WIDTH] __attribute__ ((aligned (4))); -static unsigned fg_pattern = LCD_DEFAULT_FG; -static unsigned bg_pattern = LCD_DEFAULT_BG; +static unsigned fg_pattern IDATA_ATTR = LCD_DEFAULT_FG; +static unsigned bg_pattern IDATA_ATTR = LCD_DEFAULT_BG; static int drawmode = DRMODE_SOLID; static int xmargin = 0; static int ymargin = 0; @@ -145,21 +145,25 @@ int lcd_getstringsize(const unsigned char *str, int *w, int *h) /*** low-level drawing functions ***/ +static void setpixel(int x, int y) ICODE_ATTR; static void setpixel(int x, int y) { lcd_framebuffer[y][x] = fg_pattern; } +static void clearpixel(int x, int y) ICODE_ATTR; static void clearpixel(int x, int y) { lcd_framebuffer[y][x] = bg_pattern; } +static void flippixel(int x, int y) ICODE_ATTR; static void flippixel(int x, int y) { lcd_framebuffer[y][x] = ~lcd_framebuffer[y][x]; } +static void nopixel(int x, int y) ICODE_ATTR; static void nopixel(int x, int y) { (void)x; diff --git a/firmware/drivers/lcd-h300.c b/firmware/drivers/lcd-h300.c index 4edfe404b3..17fe1f530b 100644 --- a/firmware/drivers/lcd-h300.c +++ b/firmware/drivers/lcd-h300.c @@ -41,6 +41,7 @@ void lcd_begin_write_gram(void) *(volatile unsigned short *)0xf0000000 = 0x22; } +void lcd_write_data(const unsigned short* p_bytes, int count) ICODE_ATTR; void lcd_write_data(const unsigned short* p_bytes, int count) { while(count--)