libnds
Loading...
Searching...
No Matches
Functions
sdmmc.h File Reference

SDMMC ARM9 module. More...

#include <unistd.h>

Functions

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_Startup (void)
 Initialize the eMMC NAND.
 
bool nand_WriteSectors (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.
 

Detailed Description

SDMMC ARM9 module.

Function Documentation

◆ 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]sectorThe start sector.
[in]numSectorsThe number of sectors to read.
bufferThe output buffer pointer.
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_WriteSectors()

bool nand_WriteSectors ( sec_t  sector,
sec_t  numSectors,
const void *  buffer 
)

Writes one or more sectors to the eMMC NAND.

Parameters
[in]sectorThe start sector.
[in]numSectorsThe number of sectors to read.
[in]bufferThe 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.