From cd87971badf61ddc53a534acd44c124d4a2cd026 Mon Sep 17 00:00:00 2001 From: Marcin Bukat Date: Mon, 14 Jun 2010 10:42:45 +0000 Subject: HD200 - use ide_power_enable() in bootloader git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26844 a1c6a512-1295-4272-9138-f99709370657 --- bootloader/mpio_hd200.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'bootloader') 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)) { -- cgit v1.2.3