File nut/dev/mmcard.c


Included Files


Preprocessor definitions

#define MMC_BLOCK_SIZE 512

Typedef MMCFCB

typedef struct _MMCFCB MMCFCB
struct _MMCFCB  
   {  
      NUTDEVICE* fcb_fsdev;  
      DOSPART fcb_part;  
      u_long fcb_blknum;  
      u_char fcb_blkbuf[512];  
   }  

Local Variables

mutex
static HANDLE mutex
Used in: MmCardGetReg()  
  MmCardIOCtl()  
  MmCardInit()  
  MmCardReadOrVerify()  
  MmCardWrite()  

Global Function MmCardBlockRead()

int MmCardBlockRead ( NUTFILE* nfp, void* buffer, int num )
Prototyped in: nut/include/dev/mmcard.h
Calls: MmCardReadOrVerify() nut/dev/mmcard.c

Global Function MmCardBlockWrite()

int MmCardBlockWrite ( NUTFILE* nfp, const void* buffer, int num )
Prototyped in: nut/include/dev/mmcard.h
Calls: MmCardWrite() nut/dev/mmcard.c

Global Function MmCardBlockWrite_P()

int MmCardBlockWrite_P ( NUTFILE* nfp, const prog_char* buffer, int num )
Prototyped in: nut/include/dev/mmcard.h

Global Function MmCardDevInit()

int MmCardDevInit ( NUTDEVICE* dev )
Prototyped in: nut/include/dev/mmcard.h

Global Function MmCardIOCtl()

int MmCardIOCtl ( NUTDEVICE* dev, int req, void* conf )
Prototyped in: nut/include/dev/mmcard.h
Calls: MmCardGetReg() nut/dev/mmcard.c
  MmCardRxR2() nut/dev/mmcard.c
  MmCardRxR3() nut/dev/mmcard.c
  MmCardTxCmd() nut/dev/mmcard.c
  NutEventPost() nut/os/event.c
  NutEventWait() nut/os/event.c
References Variables: mutex nut/dev/mmcard.c

Global Function MmCardMount()

NUTFILE* MmCardMount ( NUTDEVICE* dev, const char* name, int mode, int acc )
Prototyped in: nut/include/dev/mmcard.h
Calls: MmCardInit() nut/dev/mmcard.c
  MmCardReadOrVerify() nut/dev/mmcard.c
  MmCardUnmount() nut/dev/mmcard.c
  NutHeapAlloc() nut/os/heap.c
  NutHeapAllocClear() nut/os/heap.c
  NutHeapFree() nut/os/heap.c
  atoi(), strcmp()

Global Function MmCardUnmount()

int MmCardUnmount ( NUTFILE* nfp )
Prototyped in: nut/include/dev/mmcard.h
Calls: NutHeapFree() nut/os/heap.c
Called by: MmCardMount() nut/dev/mmcard.c

Local Function MmCardGetReg()

static int MmCardGetReg ( MMCIFC* ifc, u_char cmd, u_char* rbp, int siz )
Calls: MmCardRxR1() nut/dev/mmcard.c
  MmCardTxCmd() nut/dev/mmcard.c
  NutEventPost() nut/os/event.c
  NutEventWait() nut/os/event.c
Called by: MmCardIOCtl() nut/dev/mmcard.c
References Variables: mutex nut/dev/mmcard.c

Local Function MmCardInit()

static int MmCardInit ( MMCIFC* ifc )
Calls: MmCardReset() nut/dev/mmcard.c
  MmCardRxR1() nut/dev/mmcard.c
  MmCardTxCmd() nut/dev/mmcard.c
  NutEventPost() nut/os/event.c
  NutSleep() nut/os/timer.c
Called by: MmCardMount() nut/dev/mmcard.c
References Variables: mutex nut/dev/mmcard.c

Local Function MmCardReadOrVerify()

static int MmCardReadOrVerify ( MMCIFC* ifc, u_long blk, u_char* buf, int vflg )
Calls: MmCardRxR1() nut/dev/mmcard.c
  MmCardTxCmd() nut/dev/mmcard.c
  NutEventPost() nut/os/event.c
  NutEventWait() nut/os/event.c
Called by: MmCardBlockRead() nut/dev/mmcard.c
  MmCardMount() nut/dev/mmcard.c
References Variables: mutex nut/dev/mmcard.c

Local Function MmCardReset()

static int MmCardReset ( MMCIFC* ifc )
Calls: MmCardRxR1() nut/dev/mmcard.c
  MmCardTxCmd() nut/dev/mmcard.c
Called by: MmCardInit() nut/dev/mmcard.c

Local Function MmCardRxR1()

static u_char MmCardRxR1 ( MMCIFC* ifc )
Called by: MmCardGetReg() nut/dev/mmcard.c
  MmCardInit() nut/dev/mmcard.c
  MmCardReadOrVerify() nut/dev/mmcard.c
  MmCardReset() nut/dev/mmcard.c
  MmCardRxR2() nut/dev/mmcard.c
  MmCardRxR3() nut/dev/mmcard.c
  MmCardWrite() nut/dev/mmcard.c

Local Function MmCardRxR2()

static u_short MmCardRxR2 ( MMCIFC* ifc )
Calls: MmCardRxR1() nut/dev/mmcard.c
Called by: MmCardIOCtl() nut/dev/mmcard.c

Local Function MmCardRxR3()

static u_char MmCardRxR3 ( MMCIFC* ifc, u_long* ocr )
Calls: MmCardRxR1() nut/dev/mmcard.c
Called by: MmCardIOCtl() nut/dev/mmcard.c

Local Function MmCardTxCmd()

static void MmCardTxCmd ( MMCIFC* ifc, u_char cmd, u_long param )
Calls: NutSleep() nut/os/timer.c
Called by: MmCardGetReg() nut/dev/mmcard.c
  MmCardIOCtl() nut/dev/mmcard.c
  MmCardInit() nut/dev/mmcard.c
  MmCardReadOrVerify() nut/dev/mmcard.c
  MmCardReset() nut/dev/mmcard.c
  MmCardWrite() nut/dev/mmcard.c

Local Function MmCardWrite()

static int MmCardWrite ( MMCIFC* ifc, u_long blk, const u_char* buf )
Calls: MmCardRxR1() nut/dev/mmcard.c
  MmCardTxCmd() nut/dev/mmcard.c
  NutEventPost() nut/os/event.c
  NutEventWait() nut/os/event.c
  NutSleep() nut/os/timer.c
Called by: MmCardBlockWrite() nut/dev/mmcard.c
References Variables: mutex nut/dev/mmcard.c