1
0
Fork 0
forked from len0rd/rockbox

HD200 - use ide_power_enable() in bootloader

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26844 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Marcin Bukat 2010-06-14 10:42:45 +00:00
parent cc6747ca5b
commit cd87971bad

View file

@ -376,6 +376,7 @@ void main(void)
case (EVENT_ON | EVENT_AC):
/* hold is handled in button driver */
cpu_idle_mode(false);
ide_power_enable(true);
if (button == (BUTTON_PLAY|BUTTON_REC))
bootmenu();
@ -385,13 +386,19 @@ void main(void)
break;
case EVENT_AC:
/* turn on charging */
if (!(last_event & EVENT_AC))
{
/* high current charge */
or_l((1<<15),&GPIO_OUT);
and_l(~(1<<23), &GPIO_ENABLE);
}
/* USB unplug */
if (last_event & EVENT_USB)
{
usb_enable(false);
ide_power_enable(false);
}
if(!_battery_full())
{
@ -410,7 +417,11 @@ void main(void)
case EVENT_USB:
case (EVENT_USB | EVENT_AC):
if (!(last_event & EVENT_AC))
{
/* high current charge */
or_l((1<<15),&GPIO_OUT);
and_l(~(1<<23), &GPIO_ENABLE);
}
if (!(last_event & EVENT_USB))
{