SDMMC ARM9 module.
More...
#include <unistd.h>
#include <nds/ndstypes.h>
|
u8 | nand_GetDiskStatus (void) |
| Returns the SDMMC_STATUS bits of the eMMC NAND.
|
|
u32 | nand_GetSectors (void) |
| Outputs the number of sectors for the eMMC NAND.
|
|
bool | nand_ReadSectors (sec_t sector, sec_t numSectors, void *buffer) |
| Reads one or more sectors from the eMMC NAND.
|
|
bool | nand_ReadSectorsCrypt (sec_t sector, sec_t numSectors, void *buffer) |
| Reads one or more sectors from the eMMC NAND.
|
|
bool | nand_SetupCrypt (void) |
| Initialize the aes keys to allow reading encrypted eMMC NAND.
|
|
bool | nand_Startup (void) |
| Initialize the eMMC NAND.
|
|
void | nand_WriteProtect (bool protect) |
| Enables write protection for eMMC NAND.
|
|
bool | nand_WriteSectors (sec_t sector, sec_t numSectors, const void *buffer) |
| Writes one or more sectors to the eMMC NAND.
|
|
bool | nand_WriteSectorsCrypt (sec_t sector, sec_t numSectors, const void *buffer) |
| Writes one or more sectors to the eMMC NAND.
|
|
u8 | sdmmc_GetDiskStatus (void) |
| Returns the SDMMC_STATUS bits of the SD card.
|
|
u32 | sdmmc_GetSectors (void) |
| Outputs the number of sectors for the SD card.
|
|
◆ nand_GetDiskStatus()
u8 nand_GetDiskStatus |
( |
void |
| ) |
|
Returns the SDMMC_STATUS bits of the eMMC NAND.
- Returns
- Returns the SDMMC_STATUS bits or SDMMC_STATUS_NODISK | SDMMC_STATUS_NOINIT on failure.
◆ nand_GetSectors()
u32 nand_GetSectors |
( |
void |
| ) |
|
Outputs the number of sectors for the eMMC NAND.
- Returns
- Returns the number of sectors or 0 on failure.
◆ nand_ReadSectors()
bool nand_ReadSectors |
( |
sec_t |
sector, |
|
|
sec_t |
numSectors, |
|
|
void * |
buffer |
|
) |
| |
Reads one or more sectors from the eMMC NAND.
- Parameters
-
[in] | sector | The start sector. |
[in] | numSectors | The number of sectors to read. |
| buffer | The output buffer pointer. |
- Returns
- Returns true on success or false on failure.
◆ nand_ReadSectorsCrypt()
bool nand_ReadSectorsCrypt |
( |
sec_t |
sector, |
|
|
sec_t |
numSectors, |
|
|
void * |
buffer |
|
) |
| |
Reads one or more sectors from the eMMC NAND.
- Parameters
-
[in] | sector | The start sector. |
[in] | numSectors | The number of sectors to read. |
| buffer | The output buffer pointer. |
- Returns
- Returns true on success or false on failure.
◆ nand_SetupCrypt()
bool nand_SetupCrypt |
( |
void |
| ) |
|
Initialize the aes keys to allow reading encrypted eMMC NAND.
- Returns
- Returns true on success or false on failure.
◆ nand_Startup()
bool nand_Startup |
( |
void |
| ) |
|
Initialize the eMMC NAND.
- Returns
- Returns true on success or false on failure.
◆ nand_WriteProtect()
void nand_WriteProtect |
( |
bool |
protect | ) |
|
Enables write protection for eMMC NAND.
- Parameters
-
[in] | protect | Wether write protection is enabled or not (defaults on). |
- Note
- This protection state only affects nand writes performed through file i/o operations. Manually calling functions to write to the nand will still go through
◆ nand_WriteSectors()
bool nand_WriteSectors |
( |
sec_t |
sector, |
|
|
sec_t |
numSectors, |
|
|
const void * |
buffer |
|
) |
| |
Writes one or more sectors to the eMMC NAND.
- Parameters
-
[in] | sector | The start sector. |
[in] | numSectors | The number of sectors to read. |
[in] | buffer | The input buffer pointer. |
- Returns
- Returns true on success or false on failure.
◆ nand_WriteSectorsCrypt()
bool nand_WriteSectorsCrypt |
( |
sec_t |
sector, |
|
|
sec_t |
numSectors, |
|
|
const void * |
buffer |
|
) |
| |
Writes one or more sectors to the eMMC NAND.
- Parameters
-
[in] | sector | The start sector. |
[in] | numSectors | The number of sectors to read. |
[in] | buffer | The input buffer pointer. |
- Returns
- Returns true on success or false on failure.
◆ sdmmc_GetDiskStatus()
u8 sdmmc_GetDiskStatus |
( |
void |
| ) |
|
Returns the SDMMC_STATUS bits of the SD card.
- Returns
- Returns the SDMMC_STATUS bits or SDMMC_STATUS_NODISK | SDMMC_STATUS_NOINIT on failure.
◆ sdmmc_GetSectors()
u32 sdmmc_GetSectors |
( |
void |
| ) |
|
Outputs the number of sectors for the SD card.
- Returns
- Returns the number of sectors or 0 on failure.