forked from len0rd/rockbox
Sansa Connect: Disable EMIF clock after booting main binary. Raise the threshold values for battery dangerous and shutoff levels.
On this player EMIF is needed for accessing NOR flash. Disabling it improves battery runtime by about 25 minutes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31373 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
74516e06e7
commit
c24a36dd9d
2 changed files with 7 additions and 2 deletions
|
@ -31,13 +31,13 @@ static unsigned int current_battery_level = 100;
|
|||
/* This specifies the battery level that writes are still safe */
|
||||
const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] =
|
||||
{
|
||||
1
|
||||
5
|
||||
};
|
||||
|
||||
/* Below this the player cannot be considered to operate reliably */
|
||||
const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] =
|
||||
{
|
||||
0
|
||||
4
|
||||
};
|
||||
|
||||
/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */
|
||||
|
|
|
@ -374,6 +374,11 @@ void system_init(void)
|
|||
|
||||
i2c_init();
|
||||
avr_hid_init();
|
||||
|
||||
#ifndef BOOTLOADER
|
||||
/* Disable External Memory interface (used for accessing NOR flash) */
|
||||
bitclr16(&IO_CLK_MOD0, CLK_MOD0_EMIF);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue