ChibiOS/RT Logo ChibiOS/RT

Architecture - Reference Manual - Guides

Data Structures | Defines | Typedefs | Enumerations | Functions

mmc_spi.h File Reference

MMC over SPI driver header. More...

Go to the source code of this file.

Data Structures

struct  MMCConfig
 Driver configuration structure. More...
struct  MMCDriver
 Structure representing a MMC driver. More...

Defines

#define MMC_SECTOR_SIZE   512
 Block size for MMC transfers.
#define MMC_NICE_WAITING   TRUE
 Delays insertions.
#define MMC_POLLING_INTERVAL   10
 Number of positive insertion queries before generating the insertion event.
#define MMC_POLLING_DELAY   10
 Interval, in milliseconds, between insertion queries.
#define mmcGetDriverState(mmcp)   ((mmcp)->mmc_state)
 Returns the driver state.
#define mmcIsWriteProtected(mmcp)   ((mmcp)->mmc_is_protected())
 Returns the write protect status.

Typedefs

typedef bool_t(* mmcquery_t )(void)
 Function used to query some hardware status bits.

Enumerations

enum  mmcstate_t {
  MMC_UNINIT = 0, MMC_STOP = 1, MMC_WAIT = 2, MMC_INSERTED = 3,
  MMC_READY = 4, MMC_READING = 5, MMC_WRITING = 6
}
 

Driver state machine possible states.

More...

Functions

void mmcInit (void)
 MMC over SPI driver initialization.
void mmcObjectInit (MMCDriver *mmcp, SPIDriver *spip, const SPIConfig *lscfg, const SPIConfig *hscfg, mmcquery_t is_protected, mmcquery_t is_inserted)
 Initializes an instance.
void mmcStart (MMCDriver *mmcp, const MMCConfig *config)
 Configures and activates the MMC peripheral.
void mmcStop (MMCDriver *mmcp)
 Disables the MMC peripheral.
bool_t mmcConnect (MMCDriver *mmcp)
 Performs the initialization procedure on the inserted card.
bool_t mmcDisconnect (MMCDriver *mmcp)
 Brings the driver in a state safe for card removal.
bool_t mmcStartSequentialRead (MMCDriver *mmcp, uint32_t startblk)
 Starts a sequential read.
bool_t mmcSequentialRead (MMCDriver *mmcp, uint8_t *buffer)
 Reads a block within a sequential read operation.
bool_t mmcStopSequentialRead (MMCDriver *mmcp)
 Stops a sequential read gracefully.
bool_t mmcStartSequentialWrite (MMCDriver *mmcp, uint32_t startblk)
 Starts a sequential write.
bool_t mmcSequentialWrite (MMCDriver *mmcp, const uint8_t *buffer)
 Writes a block within a sequential write operation.
bool_t mmcStopSequentialWrite (MMCDriver *mmcp)
 Stops a sequential write gracefully.

Detailed Description

MMC over SPI driver header.

Definition in file mmc_spi.h.


Generated on Sun Oct 24 2010 09:40:38 for ChibiOS/RT by doxygen 1.7.1