diff --git a/firmware/export/config/sansaclipplus.h b/firmware/export/config/sansaclipplus.h index 883a71ea21..90636b152d 100644 --- a/firmware/export/config/sansaclipplus.h +++ b/firmware/export/config/sansaclipplus.h @@ -161,7 +161,7 @@ /* #define HAVE_POWEROFF_WHILE_CHARGING */ /* define current usage levels (based on battery bench) */ -#define CURRENT_NORMAL 15 +#define CURRENT_NORMAL 19 #define CURRENT_BACKLIGHT 15 #define CURRENT_RECORD CURRENT_NORMAL /* TODO */ diff --git a/firmware/export/config/sansaclipv2.h b/firmware/export/config/sansaclipv2.h index 3ae09b7003..85c1276367 100644 --- a/firmware/export/config/sansaclipv2.h +++ b/firmware/export/config/sansaclipv2.h @@ -157,7 +157,7 @@ /* #define HAVE_POWEROFF_WHILE_CHARGING */ /* define current usage levels (based on battery bench) */ -#define CURRENT_NORMAL 23 +#define CURRENT_NORMAL 24 #define CURRENT_BACKLIGHT 15 #define CURRENT_RECORD 11 diff --git a/firmware/export/config/sansafuzev2.h b/firmware/export/config/sansafuzev2.h index f3d8e0860e..de980c6ab3 100644 --- a/firmware/export/config/sansafuzev2.h +++ b/firmware/export/config/sansafuzev2.h @@ -164,7 +164,7 @@ #define CONFIG_I2C I2C_AS3525 /* define current usage levels (based on battery bench) */ -#define CURRENT_NORMAL 30 +#define CURRENT_NORMAL 26 #define CURRENT_BACKLIGHT 30 #define CURRENT_RECORD CURRENT_NORMAL diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c index a668f65e0c..386b76e758 100644 --- a/firmware/target/arm/as3525/sd-as3525v2.c +++ b/firmware/target/arm/as3525/sd-as3525v2.c @@ -953,8 +953,20 @@ long sd_last_disk_activity(void) void sd_enable(bool on) { - /* TODO */ - (void) on; + if (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)