Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
No Matches
disk.h File Reference

Disk Driver Interface. More...

#include <zephyr/kernel.h>
#include <zephyr/types.h>
#include <zephyr/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...


 Possible Cmd Codes for disk_ioctl()
 Get the size of a disk SECTOR in bytes.
 How many sectors constitute a FLASH Erase block.
 Commit any cached read/writes to disk.
#define DISK_STATUS_OK   0x00
 Possible return bitmasks for disk_status()
#define DISK_STATUS_UNINIT   0x01
 Disk status uninitialized.
#define DISK_STATUS_NOMEDIA   0x02
 Disk status no media.
 Disk status write protected.


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

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.