diff options
| author | Linus Nielsen Feltzing <linus@haxx.se> | 2007-03-02 13:04:57 +0000 |
|---|---|---|
| committer | Linus Nielsen Feltzing <linus@haxx.se> | 2007-03-02 13:04:57 +0000 |
| commit | 8448d3b6be5756a2141bc77474bc0de0225248b9 (patch) | |
| tree | 2fd642b5c022ff97d2b0ea2b31edc1f58c9f7b4a | |
| parent | ff17905d7ceece9d3a1ec2505b6e18dc7d29b34b (diff) | |
| download | rockbox-8448d3b6be5756a2141bc77474bc0de0225248b9.zip rockbox-8448d3b6be5756a2141bc77474bc0de0225248b9.tar.gz rockbox-8448d3b6be5756a2141bc77474bc0de0225248b9.tar.bz2 rockbox-8448d3b6be5756a2141bc77474bc0de0225248b9.tar.xz | |
H300 bootloader: init the ISP1362 chip, and set the CPU to idle mode while charging, to save power
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12547 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | bootloader/iriver_h300.c | 7 | ||||
| -rw-r--r-- | firmware/SOURCES | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/bootloader/iriver_h300.c b/bootloader/iriver_h300.c index b2a667c..00408cb 100644 --- a/bootloader/iriver_h300.c +++ b/bootloader/iriver_h300.c @@ -43,6 +43,7 @@ #include "pcf50606.h" #include "common.h" #include "rbunicode.h" +#include "isp1362.h" #include <stdarg.h> @@ -189,6 +190,8 @@ void main(void) coldfire_set_pllcr_audio_bits(DEFAULT_PLLCR_AUDIO_BITS); set_irq_level(0); + isp1362_init(); + adc_init(); button_init(); @@ -245,6 +248,8 @@ void main(void) bool blink_toggle = false; bool request_start = false; + cpu_idle_mode(true); + while(charger_inserted() && !request_start) { button = button_get_w_tmo(HZ); @@ -286,6 +291,8 @@ void main(void) __reset_cookie(); power_off(); } + + cpu_idle_mode(false); } usb_init(); diff --git a/firmware/SOURCES b/firmware/SOURCES index f07145c..c1a2117 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES @@ -209,10 +209,13 @@ drivers/tlv320.c #endif /* SIMULATOR */ /* USBOTG */ -#if !defined(SIMULATOR) && !defined(BOOTLOADER) +#if !defined(SIMULATOR) #if CONFIG_USBOTG == USBOTG_ISP1362 drivers/isp1362.c -#elif CONFIG_USBOTG == USBOTG_M5636 +#endif +#endif +#if !defined(SIMULATOR) && !defined(BOOTLOADER) +#if CONFIG_USBOTG == USBOTG_M5636 drivers/m5636.c #elif CONFIG_USBOTG == USBOTG_ARC drivers/arcotg_udc.c |