summaryrefslogtreecommitdiff
path: root/bootloader
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2010-06-14 10:42:45 +0000
committerMarcin Bukat <marcin.bukat@gmail.com>2010-06-14 10:42:45 +0000
commitcd87971badf61ddc53a534acd44c124d4a2cd026 (patch)
tree039999a42634bb97728e10af0156e4af0464a284 /bootloader
parentcc6747ca5ba6a8597aa134e8c51803a55f2c9d56 (diff)
HD200 - use ide_power_enable() in bootloader
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26844 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/mpio_hd200.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/bootloader/mpio_hd200.c b/bootloader/mpio_hd200.c
index 8062f7ef22..5b72dd3243 100644
--- a/bootloader/mpio_hd200.c
+++ b/bootloader/mpio_hd200.c
@@ -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))
{