Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
Disk Driver Interface. More...
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... | |
Disk Driver Interface.
#define DISK_IOCTL_CTRL_SYNC 5 |
#include <include/drivers/disk.h>
Commit any cached read/writes to disk
#define DISK_IOCTL_GET_ERASE_BLOCK_SZ 4 |
#include <include/drivers/disk.h>
How many sectors constitute a FLASH Erase block
#define DISK_IOCTL_GET_SECTOR_COUNT 1 |
#include <include/drivers/disk.h>
Possible Cmd Codes for disk_ioctl()
Get the number of sectors in the disk
#define DISK_IOCTL_GET_SECTOR_SIZE 2 |
#include <include/drivers/disk.h>
Get the size of a disk SECTOR in bytes
#define DISK_IOCTL_RESERVED 3 |
#include <include/drivers/disk.h>
reserved. It used to be DISK_IOCTL_GET_DISK_SIZE
#define DISK_STATUS_NOMEDIA 0x02 |
#include <include/drivers/disk.h>
Disk status no media
#define DISK_STATUS_OK 0x00 |
#define DISK_STATUS_UNINIT 0x01 |
#include <include/drivers/disk.h>
Disk status uninitialized
#define DISK_STATUS_WR_PROTECT 0x04 |
#include <include/drivers/disk.h>
Disk status write protected
int disk_access_register | ( | struct disk_info * | disk | ) |
#include <include/drivers/disk.h>
Register disk.
[in] | disk | Pointer to the disk info structure |
int disk_access_unregister | ( | struct disk_info * | disk | ) |
#include <include/drivers/disk.h>
Unregister disk.
[in] | disk | Pointer to the disk info structure |