freemyipod r422 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r421‎ | r422 | r423 >
Date:12:36, 15 January 2011
Author:theseven
Status:new
Tags:
Comment:
Fix shutdown logic: Should avoid both Ilitek LCD freezes and HDD emergency retracts
Modified paths:
  • /apps/uninstaller-classic/main.c (modified) (history)
  • /apps/uninstaller-nano2g/main.c (modified) (history)
  • /embios/trunk/shutdown.c (modified) (history)

Diff [purge]

Index: apps/uninstaller-classic/main.c
@@ -100,7 +100,6 @@
101101 rendertext(&lcdbuffer[320 * 194 + 10], 0, 0xffff, "Will enter DFU mode in 5 seconds...", 320);
102102 displaylcd(0, 319, 0, 239, lcdbuffer, 0);
103103 sleep(5000000);
104 - backlight_on(false);
105104 shutdown(true);
106105 reset();
107106 }
Index: apps/uninstaller-nano2g/main.c
@@ -227,6 +227,6 @@
228228 rendertext(&lcdbuffer[177], 0, 0xffff, "Uninstallation successful! ", 176);
229229 displaylcd(0, 175, 0, 131, lcdbuffer, 0);
230230 sleep(1000000);
231 - shutdown(true);
 231+ shutdown(false);
232232 reset();
233233 }
Index: embios/trunk/shutdown.c
@@ -33,6 +33,7 @@
3434 #endif
3535 #ifdef HAVE_STORAGE_FLUSH
3636 storage_flush();
 37+ storage_sleepnow();
3738 #endif
3839 if (shutdownhw)
3940 {
@@ -43,9 +44,6 @@
4445 #ifdef HAVE_LCD_SHUTDOWN
4546 lcd_shutdown();
4647 #endif
47 -#ifdef HAVE_STORAGE
48 - storage_sleepnow();
49 -#endif
5048 }
5149 #ifdef HAVE_LCD
5250 else displaylcd_sync();