freemyipod r319 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r318‎ | r319 | r320 >
Date:18:02, 12 December 2010
Author:theseven
Status:new
Tags:
Comment:
emBIOS: s5l8702: Shut down LCD properly
Modified paths:
  • /embios/trunk/target/ipodnano3g/lcd.c (modified) (history)

Diff [purge]

Index: embios/trunk/target/ipodnano3g/lcd.c
@@ -141,7 +141,45 @@
142142 void lcd_shutdown()
143143 {
144144 displaylcd_sync();
145 - // TODO: Shut down properly
 145+ uint32_t type = lcd_detect();
 146+ if (type == 3)
 147+ {
 148+ lcd_send_cmd(0x7);
 149+ lcd_send_data(0x172);
 150+ lcd_send_cmd(0x30);
 151+ lcd_send_data(0x3ff);
 152+ sleep(90000);
 153+ lcd_send_cmd(0x7);
 154+ lcd_send_data(0x120);
 155+ lcd_send_cmd(0x30);
 156+ lcd_send_data(0x0);
 157+ lcd_send_cmd(0x100);
 158+ lcd_send_data(0x780);
 159+ lcd_send_cmd(0x7);
 160+ lcd_send_data(0x0);
 161+ lcd_send_cmd(0x101);
 162+ lcd_send_data(0x260);
 163+ lcd_send_cmd(0x102);
 164+ lcd_send_data(0xa9);
 165+ sleep(30000);
 166+ lcd_send_cmd(0x100);
 167+ lcd_send_data(0x700);
 168+ lcd_send_cmd(0x100);
 169+ lcd_send_data(0x704);
 170+ }
 171+ else if (type == 1)
 172+ {
 173+ lcd_send_cmd(0x28);
 174+ lcd_send_cmd(0x10);
 175+ sleep(100000);
 176+ }
 177+ else
 178+ {
 179+ lcd_send_cmd(0x28);
 180+ sleep(50000);
 181+ lcd_send_cmd(0x10);
 182+ sleep(50000);
 183+ }
146184 }
147185
148186 void INT_DMAC0C0()