Nut/OS  4.10.3
API Reference
spi_mmc.c File Reference
#include <cfg/mmci.h>
#include <sys/nutdebug.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <memdebug.h>
#include <sys/heap.h>
#include <sys/timer.h>
#include <sys/event.h>
#include <fs/dospart.h>
#include <fs/fs.h>
#include <dev/blockdev.h>
#include <dev/spibus.h>
#include <dev/mmcard.h>
Include dependency graph for spi_mmc.c:

Go to the source code of this file.

Data Structures

struct  _MMCFCB
 Local multimedia card mount information. More...

Defines

#define MMC_BLOCK_SIZE   512
 Block size.
#define MMC_MAX_INIT_POLLS   512
 Card init timeout.
#define MMC_MAX_RESET_RETRIES   2
 Card reset timeout.
#define MMC_MAX_WRITE_RETRIES   2
 Card write retries.
#define MMC_MAX_READ_RETRIES   MMC_MAX_WRITE_RETRIES
 Card read retries.
#define MMC_MAX_CMDACK_POLLS   1024
 Command acknowledge timeout.
#define MMC_MAX_READY_POLLS   800
 Card busy timeout.

Typedefs

typedef struct _MMCFCB MMCFCB
 Local multimedia card status information.

Functions

int SpiMmcBlockRead (NUTFILE *nfp, void *buffer, int num)
 Read data blocks from a mounted partition.
int SpiMmcBlockWrite (NUTFILE *nfp, CONST void *buffer, int num)
 Write data blocks to a mounted partition.
int SpiMmcBlockWrite_P (NUTFILE *nfp, PGM_P buffer, int num)
 Write data blocks from program space to a mounted partition.
int SpiMmcUnmount (NUTFILE *nfp)
 Unmount a previously mounted partition.
NUTFILESpiMmcMount (NUTDEVICE *dev, CONST char *name, int mode, int acc)
 Mount a partition.
int SpiMmcIOCtl (NUTDEVICE *dev, int req, void *conf)
 Perform MMC control functions.
int SpiMmcInit (NUTDEVICE *dev)
 Initialize MMC driver.