Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
disk.h File Reference

Disk Driver Interface. More...

#include <kernel.h>
#include <zephyr/types.h>
#include <sys/dlist.h>

Go to the source code of this file.

Data Structures

struct  disk_info
 Disk info. More...
 
struct  disk_operations
 Disk operations. More...
 

Macros

#define DISK_IOCTL_GET_SECTOR_COUNT   1
 Possible Cmd Codes for disk_ioctl() More...
 
#define DISK_IOCTL_GET_SECTOR_SIZE   2
 
#define DISK_IOCTL_RESERVED   3
 
#define DISK_IOCTL_GET_ERASE_BLOCK_SZ   4
 
#define DISK_IOCTL_CTRL_SYNC   5
 
#define DISK_STATUS_OK   0x00
 Possible return bitmasks for disk_status() More...
 
#define DISK_STATUS_UNINIT   0x01
 
#define DISK_STATUS_NOMEDIA   0x02
 
#define DISK_STATUS_WR_PROTECT   0x04
 

Functions

int disk_access_register (struct disk_info *disk)
 Register disk. More...
 
int disk_access_unregister (struct disk_info *disk)
 Unregister disk. More...
 

Detailed Description

Disk Driver Interface.

This file contains interface for disk access. Apart from disks, various other storage media like Flash and RAM disks may implement this interface to be used by various higher layers(consumers) like USB Mass storage and Filesystems.