Skip to content

spidru/sdmmc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SDMMC

Overview

SDMMC is a generic driver written in embedded C which provides the physical layer communication between a device and an MMC or SD card. Being generic, it can easily be made to work with any device.

Please note that this driver does not include a filesystem. However, SDMMC can be used by a filesystem service to act as the physical layer between the card and the device.

Usage

To make use of the SDMMC driver, it is first required to define your own functions to read and write to the card (e.g. sdcard_read() and sdcard_write()), as well as a function to activate and deactivate the appropriate Slave Select (SS) line (required for SPI) (e.g. sdcard_set_ss()).

struct sdmmc_dev sdcard =
{
	.read = sdcard_read,
	.set_ss = sdcard_set_ss,
	.write = sdcard_write
};

The card can then be initialised by calling the following function:

status = SDMMC_Initialise(&sdcard);

Limitations

  • SDXC cards are not supported (yet)
  • Only single block read/write functionalities are available

About

Embedded C driver for MMC and SD cards

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages