Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
|
Public API for MMC memory card subsystem. More...
Go to the source code of this file.
Functions | |
int | mmc_write_blocks (struct sd_card *card, const uint8_t *wbuf, uint32_t start_block, uint32_t num_blocks) |
Write blocks to MMC card from buffer. | |
int | mmc_read_blocks (struct sd_card *card, uint8_t *rbuf, uint32_t start_block, uint32_t num_blocks) |
Read block from MMC card to buffer. | |
int | mmc_ioctl (struct sd_card *card, uint8_t cmd, void *buf) |
Get I/O control data from MMC card. | |
Public API for MMC memory card subsystem.
Get I/O control data from MMC card.
Sends I/O control commands to MMC card.
card | MMC card |
cmd | I/O control command Mirrors disk subsystem, see include/zephyr/drivers/disk.h for list of possible commands. |
buf | I/O control buf |
0 | IOCTL command succeeded |
-ENOTSUP | IOCTL command not supported |
-EIO | I/O failure |
int mmc_read_blocks | ( | struct sd_card * | card, |
uint8_t * | rbuf, | ||
uint32_t | start_block, | ||
uint32_t | num_blocks ) |
Read block from MMC card to buffer.
Reads blocks into MMC buffer from MMC card. For best performance, this buffer should be aligned to CONFIG_SDHC_BUFFER_ALIGNMENT
card | MMC card to read from |
rbuf | read buffer |
start_block | first block to read from |
num_blocks | number of blocks to read |
0 | read succeeded |
-EBUSY | card is busy with another request |
-ETIMEDOUT | card read timed out |
-EIO | I/O error |
int mmc_write_blocks | ( | struct sd_card * | card, |
const uint8_t * | wbuf, | ||
uint32_t | start_block, | ||
uint32_t | num_blocks ) |
Write blocks to MMC card from buffer.
Writes blocks from MMC buffer to MMC card. For best performance, this buffer should be aligned to CONFIG_SDHC_BUFFER_ALIGNMENT
card | MMC card to write from |
wbuf | write buffer |
start_block | first block to write to |
num_blocks | number of blocks to write |
0 | write succeeded |
-EBUSY | card is busy with another request |
-ETIMEDOUT | card write timed out |
-EIO | I/O error |