summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/lcd.c51
1 files changed, 28 insertions, 23 deletions
diff --git a/firmware/lcd.c b/firmware/lcd.c
index e8716a95fc..1bf0ad9507 100644
--- a/firmware/lcd.c
+++ b/firmware/lcd.c
@@ -160,14 +160,14 @@ void lcd_puthex (unsigned int value,int digits)
160 */ 160 */
161unsigned char display[DISP_X][DISP_Y/8]; 161unsigned char display[DISP_X][DISP_Y/8];
162 162
163// 163/*
164// ASCII character generation tables 164 * ASCII character generation tables
165// 165 *
166// This contains only the printable characters (0x20-0x7f). 166 * This contains only the printable characters (0x20-0x7f).
167// Each element in this table is a character pattern bitmap. 167 * Each element in this table is a character pattern bitmap.
168// 168 */
169#define ASCII_MIN 0x20 // First char in table 169#define ASCII_MIN 0x20 /* First char in table */
170#define ASCII_MAX 0x7f // Last char in table 170#define ASCII_MAX 0x7f /* Last char in table */
171 171
172extern const unsigned char char_gen_6x8[][5][1]; 172extern const unsigned char char_gen_6x8[][5][1];
173extern const unsigned char char_gen_8x12[][7][2]; 173extern const unsigned char char_gen_8x12[][7][2];
@@ -191,21 +191,21 @@ static int lcd_size; /* Current font width */
191 */ 191 */
192void lcd_init (void) 192void lcd_init (void)
193{ 193{
194 // Initialize PB0-3 as output pins 194 /* Initialize PB0-3 as output pins */
195 PBCR2 &= 0xff00; // MD = 00 195 PBCR2 &= 0xff00; /* MD = 00 */
196 PBIOR |= 0x000f; // IOR = 1 196 PBIOR |= 0x000f; /* IOR = 1 */
197 197
198 // Initialize LCD 198 /* Initialize LCD */
199 lcd_write (TRUE, LCD_CNTL_RESET); 199 lcd_write (TRUE, LCD_CNTL_RESET);
200 lcd_write (TRUE, LCD_CNTL_POWER); 200 lcd_write (TRUE, LCD_CNTL_POWER);
201 lcd_write (TRUE, LCD_CNTL_SEGREMAP); 201 lcd_write (TRUE, LCD_CNTL_SEGREMAP);
202 lcd_write (TRUE, LCD_CNTL_OUTSCAN); 202 lcd_write (TRUE, LCD_CNTL_OUTSCAN);
203 lcd_write (TRUE, LCD_CNTL_CONTRAST); 203 lcd_write (TRUE, LCD_CNTL_CONTRAST);
204 lcd_write (TRUE, 0x30); // Contrast parameter 204 lcd_write (TRUE, 0x30); /* Contrast parameter */
205 lcd_write (TRUE, LCD_CNTL_DISPON); 205 lcd_write (TRUE, LCD_CNTL_DISPON);
206 206
207 lcd_clear_display(); 207 lcd_clear_display();
208 lcd_update(); 208 lcd_update();
209} 209}
210 210
211/* 211/*
@@ -417,3 +417,8 @@ void lcd_invertrect (int x, int y, int nx, int ny)
417/* no LCD defined, no code to use */ 417/* no LCD defined, no code to use */
418#endif 418#endif
419 419
420/* -----------------------------------------------------------------
421 * local variables:
422 * eval: (load-file "rockbox-mode.el")
423 * end:
424 */