RetroArch
Macros | Functions | Variables
card_io.h File Reference
#include <gctypes.h>
Include dependency graph for card_io.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MAX_MI_NUM   1
 
#define MAX_DI_NUM   5
 
#define PAGE_SIZE256   256
 
#define PAGE_SIZE512   512
 
#define MANUFACTURER_ID(drv_no)   ((u8)(g_CID[drv_no][0]))
 
#define READ_BL_LEN(drv_no)   ((u8)(g_CSD[drv_no][5]&0x0f))
 
#define WRITE_BL_LEN(drv_no)   ((u8)((g_CSD[drv_no][12]&0x03)<<2)|((g_CSD[drv_no][13]>>6)&0x03))
 
#define C_SIZE(drv_no)   ((u16)(((g_CSD[drv_no][6]&0x03)<<10)|(g_CSD[drv_no][7]<<2)|((g_CSD[drv_no][8]>>6)&0x03)))
 
#define C_SIZE_MULT(drv_no)   ((u8)((g_CSD[drv_no][9]&0x03)<<1)|((g_CSD[drv_no][10]>>7)&0x01))
 

Functions

void sdgecko_initIODefault ()
 
s32 sdgecko_initIO (s32 drv_no)
 
s32 sdgecko_preIO (s32 drv_no)
 
s32 sdgecko_readCID (s32 drv_no)
 
s32 sdgecko_readCSD (s32 drv_no)
 
s32 sdgecko_readStatus (s32 drv_no)
 
s32 sdgecko_readSectors (s32 drv_no, u32 sector_no, u32 num_sectors, void *buf)
 
s32 sdgecko_writeSector (s32 drv_no, u32 sector_no, const void *buf, u32 len)
 
s32 sdgecko_writeSectors (s32 drv_no, u32 sector_no, u32 num_sectors, const void *buf)
 
s32 sdgecko_doUnmount (s32 drv_no)
 
void sdgecko_insertedCB (s32 drv_no)
 
void sdgecko_ejectedCB (s32 drv_no)
 

Variables

u8 g_CSD [MAX_DRIVE][16]
 
u8 g_CID [MAX_DRIVE][16]
 
u8 g_mCode [MAX_MI_NUM]
 
u16 g_dCode [MAX_MI_NUM][MAX_DI_NUM]
 

Macro Definition Documentation

◆ C_SIZE

#define C_SIZE (   drv_no)    ((u16)(((g_CSD[drv_no][6]&0x03)<<10)|(g_CSD[drv_no][7]<<2)|((g_CSD[drv_no][8]>>6)&0x03)))

◆ C_SIZE_MULT

#define C_SIZE_MULT (   drv_no)    ((u8)((g_CSD[drv_no][9]&0x03)<<1)|((g_CSD[drv_no][10]>>7)&0x01))

◆ MANUFACTURER_ID

#define MANUFACTURER_ID (   drv_no)    ((u8)(g_CID[drv_no][0]))

◆ MAX_DI_NUM

#define MAX_DI_NUM   5

◆ MAX_MI_NUM

#define MAX_MI_NUM   1

◆ PAGE_SIZE256

#define PAGE_SIZE256   256

◆ PAGE_SIZE512

#define PAGE_SIZE512   512

◆ READ_BL_LEN

#define READ_BL_LEN (   drv_no)    ((u8)(g_CSD[drv_no][5]&0x0f))

◆ WRITE_BL_LEN

#define WRITE_BL_LEN (   drv_no)    ((u8)((g_CSD[drv_no][12]&0x03)<<2)|((g_CSD[drv_no][13]>>6)&0x03))

Function Documentation

◆ sdgecko_doUnmount()

s32 sdgecko_doUnmount ( s32  drv_no)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdgecko_ejectedCB()

void sdgecko_ejectedCB ( s32  drv_no)
Here is the caller graph for this function:

◆ sdgecko_initIO()

s32 sdgecko_initIO ( s32  drv_no)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdgecko_initIODefault()

void sdgecko_initIODefault ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdgecko_insertedCB()

void sdgecko_insertedCB ( s32  drv_no)
Here is the caller graph for this function:

◆ sdgecko_preIO()

s32 sdgecko_preIO ( s32  drv_no)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdgecko_readCID()

s32 sdgecko_readCID ( s32  drv_no)
Here is the call graph for this function:

◆ sdgecko_readCSD()

s32 sdgecko_readCSD ( s32  drv_no)
Here is the call graph for this function:

◆ sdgecko_readSectors()

s32 sdgecko_readSectors ( s32  drv_no,
u32  sector_no,
u32  num_sectors,
void buf 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdgecko_readStatus()

s32 sdgecko_readStatus ( s32  drv_no)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdgecko_writeSector()

s32 sdgecko_writeSector ( s32  drv_no,
u32  sector_no,
const void buf,
u32  len 
)

◆ sdgecko_writeSectors()

s32 sdgecko_writeSectors ( s32  drv_no,
u32  sector_no,
u32  num_sectors,
const void buf 
)
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ g_CID

u8 g_CID[MAX_DRIVE][16]

◆ g_CSD

u8 g_CSD[MAX_DRIVE][16]

◆ g_dCode

◆ g_mCode

u8 g_mCode[MAX_MI_NUM]