HPGCC3 Documentation 3.0 R003

sddriver.h File Reference

Go to the source code of this file.

Data Structures

struct  SD_CARD

Defines

#define CLKREG   0x07200000
#define SDREG   0x07e00000
#define IOPORT   0x07a00000
#define HWREG(base, off)   ( (volatile unsigned int *) (((int)base+(int)off)))
#define GPD(a)   HWREG(IOPORT,0x30+a)
#define GPE(a)   HWREG(IOPORT,0x40+a)
#define GPF(a)   HWREG(IOPORT,0x50+a)
#define SDICON   HWREG(SDREG,0)
#define SDIPRE   HWREG(SDREG,0X4)
#define SDICARG   HWREG(SDREG,0x8)
#define SDICCON   HWREG(SDREG,0xc)
#define SDICSTA   HWREG(SDREG,0x10)
#define SDIRSP0   HWREG(SDREG,0x14)
#define SDIRSP1   HWREG(SDREG,0x18)
#define SDIRSP2   HWREG(SDREG,0x1c)
#define SDIRSP3   HWREG(SDREG,0x20)
#define SDIDTIMER   HWREG(SDREG,0x24)
#define SDIBSIZE   HWREG(SDREG,0x28)
#define SDIDCON   HWREG(SDREG,0x2c)
#define SDIDCNT   HWREG(SDREG,0x30)
#define SDIDSTA   HWREG(SDREG,0x34)
#define SDIFSTA   HWREG(SDREG,0x38)
#define SDIDAT   HWREG(SDREG,0x3c)
#define SDIIMSK   HWREG(SDREG,0x40)
#define CON   0
#define DAT   4
#define PULLUP   8

Functions

int SDIOSetup (SD_CARD *card, int shutdown)
int SDCardInserted ()
int GetPCLK ()
int SDSetFastPCLK ()
void SDRestorePCLK (int original)
void SDSetClock (int sdclk)
int SDGetClock ()
void SDPowerDown ()
void SDPowerUp ()
int SDSlowDown ()
int SDWaitResp (int mask)
int SDSendCmd (int cmdnum, int arg, int cmdmsk, int mask)
int SDSendACmd (int rca, int cmdnum, int arg, int cmdmsk, int mask)
int SDSendCmdNoResp (int cmdnum, int arg)
int SDSendCmdShortResp (int cmdnum, int arg, int *response)
int SDSendCmdLongResp (int cmdnum, int arg, int *response)
int SDSendACmdShortResp (int rca, int cmdnum, int arg, int *response)
int SDSendACmdLongResp (int rca, int cmdnum, int arg, int *response)
void SDIOReset ()
int SDSelect (int RCA)
int SDInit (SD_CARD *card)
int SDGetNewRCA (int *_CID)
void SDDResetFIFO ()
int SDDStop ()
int SDDSetBlockLen (SD_CARD *card, int bitlen)
int SDDInTransfer (SD_CARD *card)
int SDDRead (int SDAddr, int NumBytes, char *buffer, SD_CARD *card)
int SDCardInit (SD_CARD *card)
int SDDWrite (int SDAddr, int NumBytes, char *buffer, SD_CARD *card)

Define Documentation

#define CLKREG   0x07200000

Definition at line 16 of file sddriver.h.

#define CON   0

Definition at line 47 of file sddriver.h.

#define DAT   4

Definition at line 48 of file sddriver.h.

#define GPD (   a)    HWREG(IOPORT,0x30+a)

Definition at line 23 of file sddriver.h.

#define GPE (   a)    HWREG(IOPORT,0x40+a)

Definition at line 24 of file sddriver.h.

#define GPF (   a)    HWREG(IOPORT,0x50+a)

Definition at line 25 of file sddriver.h.

#define HWREG (   base,
  off 
)    ( (volatile unsigned int *) (((int)base+(int)off)))

Definition at line 20 of file sddriver.h.

#define IOPORT   0x07a00000

Definition at line 18 of file sddriver.h.

#define PULLUP   8

Definition at line 49 of file sddriver.h.

#define SDIBSIZE   HWREG(SDREG,0x28)

Definition at line 37 of file sddriver.h.

#define SDICARG   HWREG(SDREG,0x8)

Definition at line 29 of file sddriver.h.

#define SDICCON   HWREG(SDREG,0xc)

Definition at line 30 of file sddriver.h.

#define SDICON   HWREG(SDREG,0)

Definition at line 27 of file sddriver.h.

#define SDICSTA   HWREG(SDREG,0x10)

Definition at line 31 of file sddriver.h.

#define SDIDAT   HWREG(SDREG,0x3c)

Definition at line 42 of file sddriver.h.

#define SDIDCNT   HWREG(SDREG,0x30)

Definition at line 39 of file sddriver.h.

#define SDIDCON   HWREG(SDREG,0x2c)

Definition at line 38 of file sddriver.h.

#define SDIDSTA   HWREG(SDREG,0x34)

Definition at line 40 of file sddriver.h.

#define SDIDTIMER   HWREG(SDREG,0x24)

Definition at line 36 of file sddriver.h.

#define SDIFSTA   HWREG(SDREG,0x38)

Definition at line 41 of file sddriver.h.

#define SDIIMSK   HWREG(SDREG,0x40)

Definition at line 43 of file sddriver.h.

#define SDIPRE   HWREG(SDREG,0X4)

Definition at line 28 of file sddriver.h.

#define SDIRSP0   HWREG(SDREG,0x14)

Definition at line 32 of file sddriver.h.

#define SDIRSP1   HWREG(SDREG,0x18)

Definition at line 33 of file sddriver.h.

#define SDIRSP2   HWREG(SDREG,0x1c)

Definition at line 34 of file sddriver.h.

#define SDIRSP3   HWREG(SDREG,0x20)

Definition at line 35 of file sddriver.h.

#define SDREG   0x07e00000

Definition at line 17 of file sddriver.h.


Function Documentation

int GetPCLK ( )
int SDCardInit ( SD_CARD card)
int SDCardInserted ( )
int SDDInTransfer ( SD_CARD card)
int SDDRead ( int  SDAddr,
int  NumBytes,
char *  buffer,
SD_CARD card 
)
void SDDResetFIFO ( )
int SDDSetBlockLen ( SD_CARD card,
int  bitlen 
)
int SDDStop ( )
int SDDWrite ( int  SDAddr,
int  NumBytes,
char *  buffer,
SD_CARD card 
)
int SDGetClock ( )
int SDGetNewRCA ( int *  _CID)
int SDInit ( SD_CARD card)
void SDIOReset ( )
int SDIOSetup ( SD_CARD card,
int  shutdown 
)
void SDPowerDown ( )
void SDPowerUp ( )
void SDRestorePCLK ( int  original)
int SDSelect ( int  RCA)
int SDSendACmd ( int  rca,
int  cmdnum,
int  arg,
int  cmdmsk,
int  mask 
)
int SDSendACmdLongResp ( int  rca,
int  cmdnum,
int  arg,
int *  response 
)
int SDSendACmdShortResp ( int  rca,
int  cmdnum,
int  arg,
int *  response 
)
int SDSendCmd ( int  cmdnum,
int  arg,
int  cmdmsk,
int  mask 
)
int SDSendCmdLongResp ( int  cmdnum,
int  arg,
int *  response 
)
int SDSendCmdNoResp ( int  cmdnum,
int  arg 
)
int SDSendCmdShortResp ( int  cmdnum,
int  arg,
int *  response 
)
void SDSetClock ( int  sdclk)
int SDSetFastPCLK ( )
int SDSlowDown ( )
int SDWaitResp ( int  mask)