|
Rockbox mail archiveSubject: X5 lcdX5 lcd
From: RaeNye <raenye_at_netvision.net.il>
Date: Tue, 25 Apr 2006 02:05:48 +0200 Hi, During the disassembly of the X5 preloader I'm been going over the low-level stuff, and I saw two interesting points: 1. LCD init in lcd-x5.c is somewhat different; see the corrected routine at the end (I'll make a real diff of it once my linux reestablishes awareness of grub on its boot sector) 2. Backlight brightness is modified by setting the backlight PWM: pcf50606_write(0x35, 0xFF-(level<<1)); // level = 0..10, cowon uses level=5 So we can support backlight brightness on X5 (prolly in H3x0 too). Slowly but surely, R. -----------8<-----------------------------8<-----------------------------8<- ----------------- /* LCD init * These settings are taken from the original X5 firmware */ void lcd_init_device(void) { display_on=true; /* LCD Reset */ and_l(~0x00000010, &GPIO1_OUT); or_l(0x00000010, &GPIO1_ENABLE); or_l(0x00000010, &GPIO1_FUNCTION); sleep(HZ/100); or_l(0x00000010, &GPIO1_OUT); sleep(HZ/100); lcd_write_reg(0, 0x0001); sleep(HZ/50); lcd_write_reg(0x0d, 0x0401); lcd_write_reg(0x0e, 0x321e); lcd_write_reg(0x01, 0x0313); // was: 0x0113 lcd_write_reg(0x02, 0x0700); lcd_write_reg(0x05, 0x9018); // was: 0x9038 lcd_write_reg(0x06, 0x0000); lcd_write_reg(0x0b, 0x4000); sleep(HZ/100); lcd_write_reg(0x21,0x0000); lcd_write_reg(0x30,0x0003); lcd_write_reg(0x31,0x0400); lcd_write_reg(0x32,0x0407); lcd_write_reg(0x33,0x0305); lcd_write_reg(0x34,0x0003); lcd_write_reg(0x35,0x0704); lcd_write_reg(0x36,0x0000); // was: 0x0407 lcd_write_reg(0x37,0x0503); lcd_write_reg(0x0f,0x0000); // was: 0x0002 lcd_write_reg(0x11,0x0000); lcd_write_reg(0x14,0x9f00); lcd_write_reg(0x15,0x5c00); lcd_write_reg(0x16,0x7f00); lcd_write_reg(0x17,0x0000); // was: 0x9f00 lcd_write_reg(0x3a,0x1409); lcd_write_reg(0x3b,0x0602); lcd_write_reg(0x0c,0x0001); sleep(HZ/25); lcd_write_reg(0x03,0x002c); lcd_write_reg(0x04,0x8000); sleep(HZ/25); lcd_write_reg(0x0e,0x281e + (5<<9)); // was: 0x3318 sleep(HZ/25); lcd_write_reg(0x0d,0x0411); sleep(HZ/100); lcd_write_reg(0x07,0x0006); lcd_write_reg(0x07,0x0036); lcd_write_reg(0x07,0x0037); lcd_write_reg(0x07,0x0037); return; } Received on 2006-04-25 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |