This is the documentation for the latest (master) development branch of Zephyr. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

Disk Access

Overview

The disk access API provides access to storage disks, physical or in Flash or RAM.

Configuration Options

Related configuration options:

API Reference

group disk_access_interface

Disk Access APIs.

Defines

DISK_IOCTL_GET_SECTOR_COUNT
DISK_IOCTL_GET_SECTOR_SIZE
DISK_IOCTL_GET_ERASE_BLOCK_SZ
DISK_IOCTL_CTRL_SYNC
DISK_STATUS_OK
DISK_STATUS_UNINIT
DISK_STATUS_NOMEDIA
DISK_STATUS_WR_PROTECT

Functions

int disk_access_init(const char *pdrv)
int disk_access_status(const char *pdrv)
int disk_access_read(const char *pdrv, uint8_t *data_buf, uint32_t start_sector, uint32_t num_sector)
int disk_access_write(const char *pdrv, const uint8_t *data_buf, uint32_t start_sector, uint32_t num_sector)
int disk_access_ioctl(const char *pdrv, uint8_t cmd, void *buff)
int disk_access_register(struct disk_info *disk)
int disk_access_unregister(struct disk_info *disk)
struct disk_info
#include <disk_access.h>
struct disk_operations
#include <disk_access.h>