summaryrefslogtreecommitdiff
path: root/include/lcd.h
diff options
context:
space:
mode:
authorJeroen Hofstee <jeroen@myspectrum.nl>2013-01-12 12:07:56 +0000
committerAnatolij Gustschin <agust@denx.de>2013-03-21 10:31:38 +0100
commit6b035141f6459df01065f455cbf9c1928f2db16a (patch)
treed9bf961832d149dcfe62025b10ac33fee76df1e4 /include/lcd.h
parent00a0ca5986c13d24ebbc5000cc1b7a1cdac0ba4b (diff)
downloadu-boot-imx-6b035141f6459df01065f455cbf9c1928f2db16a.zip
u-boot-imx-6b035141f6459df01065f455cbf9c1928f2db16a.tar.gz
u-boot-imx-6b035141f6459df01065f455cbf9c1928f2db16a.tar.bz2
common/lcd: cosmetic: clean up a bit
- Make the brackets of the function calls more consistent - Remove really unnecessary brackets - Removes the extern from the function definitions - Remove curly brackets from single line statements - Remove lcd_setmem proto since it is already in common.h - Cleanup comments, remove useless comments - Remove NOT_USED_SO_FAR ifdef - Cleanup coding style cc: Anatolij Gustschin <agust@denx.de> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl> [agust: rebased the original patch] Signed-off-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'include/lcd.h')
-rw-r--r--include/lcd.h38
1 files changed, 17 insertions, 21 deletions
diff --git a/include/lcd.h b/include/lcd.h
index f88b7e9..eadbb99 100644
--- a/include/lcd.h
+++ b/include/lcd.h
@@ -35,20 +35,19 @@ extern int lcd_line_length;
extern struct vidinfo panel_info;
-extern void lcd_ctrl_init (void *lcdbase);
-extern void lcd_enable (void);
-extern int board_splash_screen_prepare(void);
+void lcd_ctrl_init(void *lcdbase);
+void lcd_enable(void);
+int board_splash_screen_prepare(void);
/* setcolreg used in 8bpp/16bpp; initcolregs used in monochrome */
-extern void lcd_setcolreg (ushort regno,
- ushort red, ushort green, ushort blue);
-extern void lcd_initcolregs (void);
+void lcd_setcolreg(ushort regno, ushort red, ushort green, ushort blue);
+void lcd_initcolregs(void);
-extern int lcd_getfgcolor(void);
+int lcd_getfgcolor(void);
/* gunzip_bmp used if CONFIG_VIDEO_BMP_GZIP */
-extern struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp);
-extern int bmp_display(ulong addr, int x, int y);
+struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp);
+int bmp_display(ulong addr, int x, int y);
/**
* Set whether we need to flush the dcache when changing the LCD image. This
@@ -259,7 +258,6 @@ typedef struct vidinfo {
unsigned int sclk_div;
unsigned int dual_lcd_enabled;
-
} vidinfo_t;
void init_panel_info(vidinfo_t *vid);
@@ -284,14 +282,12 @@ extern vidinfo_t panel_info;
/* Video functions */
#if defined(CONFIG_RBC823)
-void lcd_disable (void);
+void lcd_disable(void);
#endif
-
-/* int lcd_init (void *lcdbase); */
-void lcd_putc (const char c);
-void lcd_puts (const char *s);
-void lcd_printf (const char *fmt, ...);
+void lcd_putc(const char c);
+void lcd_puts(const char *s);
+void lcd_printf(const char *fmt, ...);
void lcd_clear(void);
int lcd_display_bitmap(ulong bmp_image, int x, int y);
@@ -351,7 +347,7 @@ int lcd_get_size(int *line_length);
* is connected, as we can't autodetect anything.
*/
#define CONFIG_SYS_HIGH 0 /* Pins are active high */
-#define CONFIG_SYS_LOW 1 /* Pins are active low */
+#define CONFIG_SYS_LOW 1 /* Pins are active low */
#define LCD_MONOCHROME 0
#define LCD_COLOR2 1
@@ -365,10 +361,10 @@ int lcd_get_size(int *line_length);
# define LCD_INFO_Y (BMP_LOGO_HEIGHT + VIDEO_FONT_HEIGHT)
#elif defined(CONFIG_LCD_LOGO)
# define LCD_INFO_X (BMP_LOGO_WIDTH + 4 * VIDEO_FONT_WIDTH)
-# define LCD_INFO_Y (VIDEO_FONT_HEIGHT)
+# define LCD_INFO_Y VIDEO_FONT_HEIGHT
#else
-# define LCD_INFO_X (VIDEO_FONT_WIDTH)
-# define LCD_INFO_Y (VIDEO_FONT_HEIGHT)
+# define LCD_INFO_X VIDEO_FONT_WIDTH
+# define LCD_INFO_Y VIDEO_FONT_HEIGHT
#endif
/* Default to 8bpp if bit depth not specified */
@@ -436,7 +432,7 @@ int lcd_get_size(int *line_length);
#define CONSOLE_COLS (panel_info.vl_col / VIDEO_FONT_WIDTH)
#define CONSOLE_ROW_SIZE (VIDEO_FONT_HEIGHT * lcd_line_length)
-#define CONSOLE_ROW_FIRST (lcd_console_address)
+#define CONSOLE_ROW_FIRST lcd_console_address
#define CONSOLE_ROW_SECOND (lcd_console_address + CONSOLE_ROW_SIZE)
#define CONSOLE_ROW_LAST (lcd_console_address + CONSOLE_SIZE \
- CONSOLE_ROW_SIZE)