FS#11402 by me : sd_enable for Sansa AMSv2

Gets a bit more battery life
Adjust current usage, it was a bit too low for Clipv2/Clip+

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26866 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rafaël Carré 2010-06-16 06:08:04 +00:00
parent d258c58937
commit 46e1231a44
4 changed files with 17 additions and 5 deletions

View file

@ -161,7 +161,7 @@
/* #define HAVE_POWEROFF_WHILE_CHARGING */ /* #define HAVE_POWEROFF_WHILE_CHARGING */
/* define current usage levels (based on battery bench) */ /* define current usage levels (based on battery bench) */
#define CURRENT_NORMAL 15 #define CURRENT_NORMAL 19
#define CURRENT_BACKLIGHT 15 #define CURRENT_BACKLIGHT 15
#define CURRENT_RECORD CURRENT_NORMAL /* TODO */ #define CURRENT_RECORD CURRENT_NORMAL /* TODO */

View file

@ -157,7 +157,7 @@
/* #define HAVE_POWEROFF_WHILE_CHARGING */ /* #define HAVE_POWEROFF_WHILE_CHARGING */
/* define current usage levels (based on battery bench) */ /* define current usage levels (based on battery bench) */
#define CURRENT_NORMAL 23 #define CURRENT_NORMAL 24
#define CURRENT_BACKLIGHT 15 #define CURRENT_BACKLIGHT 15
#define CURRENT_RECORD 11 #define CURRENT_RECORD 11

View file

@ -164,7 +164,7 @@
#define CONFIG_I2C I2C_AS3525 #define CONFIG_I2C I2C_AS3525
/* define current usage levels (based on battery bench) */ /* define current usage levels (based on battery bench) */
#define CURRENT_NORMAL 30 #define CURRENT_NORMAL 26
#define CURRENT_BACKLIGHT 30 #define CURRENT_BACKLIGHT 30
#define CURRENT_RECORD CURRENT_NORMAL #define CURRENT_RECORD CURRENT_NORMAL

View file

@ -953,8 +953,20 @@ long sd_last_disk_activity(void)
void sd_enable(bool on) void sd_enable(bool on)
{ {
/* TODO */ if (on)
(void) on; {
CGU_PERI |= CGU_MCI_CLOCK_ENABLE;
CGU_IDE |= (1<<7); /* AHB interface enable */
CGU_MEMSTICK |= (1<<7); /* interface enable */
CGU_SDSLOT |= (1<<7); /* interface enable */
}
else
{
CGU_SDSLOT &= ~(1<<7); /* interface enable */
CGU_MEMSTICK &= ~(1<<7); /* interface enable */
CGU_IDE &= ~(1<<7); /* AHB interface enable */
CGU_PERI &= ~CGU_MCI_CLOCK_ENABLE;
}
} }
tCardInfo *card_get_info_target(int card_no) tCardInfo *card_get_info_target(int card_no)