git subrepo pull --force emummc

subrepo:
  subdir:   "emummc"
  merged:   "2fc47cbb8"
upstream:
  origin:   "https://github.com/lulle2007200/emuMMC.git"
  branch:   "develop"
  commit:   "2fc47cbb8"
git-subrepo:
  version:  "0.4.9"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "30db3b8"
This commit is contained in:
lulle2007200
2025-05-12 14:22:12 +02:00
parent 0188898af4
commit 92c599f0f0
342 changed files with 106677 additions and 974 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -29,6 +29,7 @@ extern "C" {
#include <string.h>
#include "../emmc/nx_sd.h"
#include "../emmc/nx_emmc.h"
#include "../emmc/sdmmc.h"
#include "../soc/i2c.h"
#include "../soc/gpio.h"
@@ -46,11 +47,15 @@ typedef sdmmc_accessor_t *(*_sdmmc_accessor_nand)();
typedef void (*_lock_mutex)(void *mtx);
typedef void (*_unlock_mutex)(void *mtx);
bool sdmmc_initialize(void);
void sdmmc_finalize(void);
bool sdmmc_initialize_sd(void);
void sdmmc_finalize_sd(void);
int sdmmc_nand_get_active_partition_index();
sdmmc_accessor_t *sdmmc_accessor_get(int mmc_id);
bool sdmmc_initialize_emmc(void);
void sdmmc_finalize_emmc(void);
void mutex_lock_handler(int mmc_id);
void mutex_unlock_handler(int mmc_id);
@@ -60,6 +65,10 @@ uint64_t sdmmc_wrapper_controller_close(int mmc_id);
uint64_t sdmmc_wrapper_read(void *buf, uint64_t bufSize, int mmc_id, unsigned int sector, unsigned int num_sectors);
uint64_t sdmmc_wrapper_write(int mmc_id, unsigned int sector, unsigned int num_sectors, void *buf, uint64_t bufSize);
extern _sdmmc_accessor_sd sdmmc_accessor_sd;
extern _sdmmc_accessor_nand sdmmc_accessor_nand;
extern _sdmmc_accessor_gc sdmmc_accessor_gc;
typedef struct _file_based_ctxt
{
FATFS sd_fs;

View File

@@ -22,19 +22,16 @@
#include "../FS/FS_versions.h"
#define EMUMMC_STORAGE_MAGIC 0x30534645 /* EFS0, EmuFS0 */
#define EMUMMC_MAX_DIR_LENGTH 0x7F
enum emuMMC_Type
{
// EMMC Device raw
emuMMC_EMMC = 0,
// 0x80 for path from config + 0xf for drive prefix
#define EMUMMC_MAX_DIR_LENGTH 0x8F
// SD Device raw
emuMMC_SD_Raw,
// SD Device File
emuMMC_SD_File,
emuMMC_MAX
enum EmummcType {
EmummcType_None = 0,
EmummcType_Partition_Sd = 1,
EmummcType_File_Sd = 2,
EmummcType_Partition_Emmc = 3,
EmummcType_File_Emmc = 4,
};
typedef struct _emuMMC_ctx_t
@@ -42,15 +39,15 @@ typedef struct _emuMMC_ctx_t
u32 magic;
u32 id;
enum FS_VER fs_ver;
enum emuMMC_Type EMMC_Type;
enum emuMMC_Type SD_Type;
enum EmummcType EMMC_Type;
enum EmummcType SD_Type;
/* Partition based */
u64 EMMC_StoragePartitionOffset;
u64 SD_StoragePartitionOffset;
/* File-Based */
char storagePath[EMUMMC_MAX_DIR_LENGTH+1];
char storagePath[EMUMMC_MAX_DIR_LENGTH + 1];
} emuMMC_ctx_t, *PemuMMC_ctx_t;
#endif /* __EMUMMC_CTX_H__ */