Add partitioning

Also add sd mounting/unmounting
Also add vol+/- controls for sideways menus
This commit is contained in:
suchmememanyskill
2020-12-28 20:08:15 +01:00
parent baec43da2a
commit f1d433e69a
12 changed files with 225 additions and 15 deletions

View File

@@ -13,4 +13,5 @@ int connectMMC(u8 mmcType);
ErrCode_t mountMMCPart(const char *partition);
void SetKeySlots();
void unmountMMCPart();
link_t *GetCurGPT();
link_t *GetCurGPT();
void disconnectMMC();

View File

@@ -22,7 +22,7 @@
#include <libs/fatfs/ff.h>
#include <mem/heap.h>
static bool sd_mounted = false;
bool sd_mounted = false;
static u16 sd_errors[3] = { 0 }; // Init and Read/Write errors.
static u32 sd_mode = SD_UHS_SDR82;
@@ -130,12 +130,15 @@ bool sd_initialize(bool power_cycle)
return false;
}
bool is_sd_inited = false;
bool sd_mount()
{
if (sd_mounted)
return true;
int res = !sd_initialize(false);
is_sd_inited = !res;
if (res)
{