Low Level MMC Interface
[CPLD Based Devices]

Routines for using the SPI interface of the Ethernut CPLD. More...

Collaboration diagram for Low Level MMC Interface:

Defines

#define I2C_SLA_PLL   0x69

Functions

int NplMmCard0Avail (void)
 Check if card is available.
int NplMmCard0WrProt (void)
 Check if card is write protected.

Variables

NUTDEVICE devNplMmc0
 Multimedia card device information structure.
NUTDEVICE devSbiMmc0
 Multimedia card device information structure.
NUTDEVICE devNplMmc0
 Multimedia card device information structure.

Detailed Description

Routines for using the SPI interface of the Ethernut CPLD.

Define Documentation

#define I2C_SLA_PLL   0x69

Definition at line 97 of file nplmmc.c.


Function Documentation

int NplMmCard0Avail ( void   ) 

Check if card is available.

Todo:
Card change should verify the card identifier. Right now any detection of removing and re-inserting a card counts as a card change.
Returns:
0 if no card is detected, 1 if a card is available or 2 if a card change had been detected after the last mount.

Definition at line 193 of file nplmmc.c.

int NplMmCard0WrProt ( void   ) 

Check if card is write protected.

Todo:
Not implemented.
Returns:
Always 0.

Definition at line 211 of file nplmmc.c.


Variable Documentation

NUTDEVICE devNplMmc0

Multimedia card device information structure.

A pointer to this structure must be passed to NutRegisterDevice() to bind this driver to the Nut/OS kernel. An application may then call /verbatim _open("MMC0:", _O_RDWR | _O_BINARY); /endverbatim to mount the first active primary partition with any previously registered file system driver (typically devPhat0).

Definition at line 321 of file nplmmc.c.

NUTDEVICE devSbiMmc0

Multimedia card device information structure.

A pointer to this structure must be passed to NutRegisterDevice() to bind this driver to the Nut/OS kernel. An application may then call /verbatim _open("MMC0:", _O_RDWR | _O_BINARY); /endverbatim to mount the first active primary partition with any previously registered file system driver (typically devPhat0).

Definition at line 513 of file sbimmc.c.

NUTDEVICE devNplMmc0

Initial value:

 {
    0,                          
    {'M', 'M', 'C', '0', 0, 0, 0, 0, 0}
    ,                           
    0,                          
    0,                          
    0,                          
    &mmc0_ifc,                  
    &mmc0_dcb,                  
    NplMmcIfcInit,              
    MmCardIOCtl,                
    MmCardBlockRead,            
    MmCardBlockWrite,           

    MmCardBlockWrite_P,         

    MmCardMount,                
    MmCardUnmount,              
    0                           
}
Multimedia card device information structure.

A pointer to this structure must be passed to NutRegisterDevice() to bind this driver to the Nut/OS kernel. An application may then call /verbatim _open("MMC0:", _O_RDWR | _O_BINARY); /endverbatim to mount the first active primary partition with any previously registered file system driver (typically devPhat0).

Definition at line 321 of file nplmmc.c.


© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/