Zephyr API 3.6.99
|
Public API for SD memory card subsystem. More...
Go to the source code of this file.
Functions | |
int | sdmmc_write_blocks (struct sd_card *card, const uint8_t *wbuf, uint32_t start_block, uint32_t num_blocks) |
Write blocks to SD card from buffer. | |
int | sdmmc_read_blocks (struct sd_card *card, uint8_t *rbuf, uint32_t start_block, uint32_t num_blocks) |
Read block from SD card to buffer. | |
int | sdmmc_ioctl (struct sd_card *card, uint8_t cmd, void *buf) |
Get I/O control data from SD card. | |
Public API for SD memory card subsystem.
Get I/O control data from SD card.
Sends I/O control commands to SD card.
card | SD card |
cmd | I/O control command |
buf | I/O control buf |
0 | IOCTL command succeeded |
-ENOTSUP | IOCTL command not supported |
-EIO | I/O failure |
int sdmmc_read_blocks | ( | struct sd_card * | card, |
uint8_t * | rbuf, | ||
uint32_t | start_block, | ||
uint32_t | num_blocks ) |
Read block from SD card to buffer.
Reads blocks into SD buffer from SD card. For best performance, this buffer should be aligned to CONFIG_SDHC_BUFFER_ALIGNMENT
card | SD 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 sdmmc_write_blocks | ( | struct sd_card * | card, |
const uint8_t * | wbuf, | ||
uint32_t | start_block, | ||
uint32_t | num_blocks ) |
Write blocks to SD card from buffer.
Writes blocks from SD buffer to SD card. For best performance, this buffer should be aligned to CONFIG_SDHC_BUFFER_ALIGNMENT
card | SD 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 |