forked from len0rd/rockbox
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
This commit is contained in:
parent
ff17905d7c
commit
8448d3b6be
2 changed files with 12 additions and 2 deletions
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue