freemyipod r284 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r283‎ | r284 | r285 >
Date:19:40, 27 November 2010
Author:theseven
Status:new
Tags:
Comment:
emBIOS: iPod Classic VBUS detection (no firewire for now, I don't have a cable for that)
Modified paths:
  • /embios/trunk/target/ipodnano2g/power.c (modified) (history)
  • /embios/trunk/target/ipodnano3g/power.c (modified) (history)

Diff [purge]

Index: embios/trunk/target/ipodnano2g/power.c
@@ -50,7 +50,7 @@
5151 {
5252 pmu_init();
5353 pmu_write(0x1e, 15); /* Vcore = 1.000V */
54 - pmu_ldo_set_voltage(2, 0x11); /* LCD = 2.600V */
 54+ pmu_ldo_set_voltage(2, 0x11); /* LCD = 2.600V */
5555 }
5656
5757 bool charging_state(void)
Index: embios/trunk/target/ipodnano3g/power.c
@@ -58,10 +58,10 @@
5959
6060 bool external_power_state(void)
6161 {
62 - return false;
 62+ return (PDAT(12) & 8) ? false : true;
6363 }
6464
6565 bool vbus_state(void)
6666 {
67 - return true;
 67+ return (PDAT(12) & 8) ? false : true;
6868 }