diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2010-06-14 10:42:45 +0000 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2010-06-14 10:42:45 +0000 |
commit | cd87971badf61ddc53a534acd44c124d4a2cd026 (patch) | |
tree | 039999a42634bb97728e10af0156e4af0464a284 | |
parent | cc6747ca5ba6a8597aa134e8c51803a55f2c9d56 (diff) | |
download | rockbox-cd87971badf61ddc53a534acd44c124d4a2cd026.tar.gz rockbox-cd87971badf61ddc53a534acd44c124d4a2cd026.zip |
HD200 - use ide_power_enable() in bootloader
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26844 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | bootloader/mpio_hd200.c | 13 |
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) | |||
376 | case (EVENT_ON | EVENT_AC): | 376 | case (EVENT_ON | EVENT_AC): |
377 | /* hold is handled in button driver */ | 377 | /* hold is handled in button driver */ |
378 | cpu_idle_mode(false); | 378 | cpu_idle_mode(false); |
379 | ide_power_enable(true); | ||
379 | 380 | ||
380 | if (button == (BUTTON_PLAY|BUTTON_REC)) | 381 | if (button == (BUTTON_PLAY|BUTTON_REC)) |
381 | bootmenu(); | 382 | bootmenu(); |
@@ -385,13 +386,19 @@ void main(void) | |||
385 | break; | 386 | break; |
386 | 387 | ||
387 | case EVENT_AC: | 388 | case EVENT_AC: |
388 | /* turn on charging */ | ||
389 | if (!(last_event & EVENT_AC)) | 389 | if (!(last_event & EVENT_AC)) |
390 | { | ||
391 | /* high current charge */ | ||
390 | or_l((1<<15),&GPIO_OUT); | 392 | or_l((1<<15),&GPIO_OUT); |
393 | and_l(~(1<<23), &GPIO_ENABLE); | ||
394 | } | ||
391 | 395 | ||
392 | /* USB unplug */ | 396 | /* USB unplug */ |
393 | if (last_event & EVENT_USB) | 397 | if (last_event & EVENT_USB) |
398 | { | ||
394 | usb_enable(false); | 399 | usb_enable(false); |
400 | ide_power_enable(false); | ||
401 | } | ||
395 | 402 | ||
396 | if(!_battery_full()) | 403 | if(!_battery_full()) |
397 | { | 404 | { |
@@ -410,7 +417,11 @@ void main(void) | |||
410 | case EVENT_USB: | 417 | case EVENT_USB: |
411 | case (EVENT_USB | EVENT_AC): | 418 | case (EVENT_USB | EVENT_AC): |
412 | if (!(last_event & EVENT_AC)) | 419 | if (!(last_event & EVENT_AC)) |
420 | { | ||
421 | /* high current charge */ | ||
413 | or_l((1<<15),&GPIO_OUT); | 422 | or_l((1<<15),&GPIO_OUT); |
423 | and_l(~(1<<23), &GPIO_ENABLE); | ||
424 | } | ||
414 | 425 | ||
415 | if (!(last_event & EVENT_USB)) | 426 | if (!(last_event & EVENT_USB)) |
416 | { | 427 | { |