Lines Matching +full:disk +full:- +full:name

5  * SPDX-License-Identifier: Apache-2.0
10 * @brief Disk Driver Interface
12 * This file contains interface for disk access. Apart from disks, various
22 * @brief Disk Driver Interface
23 * @defgroup disk_driver_interface Disk Driver Interface
42 /** Get the number of sectors in the disk */
44 /** Get the size of a disk SECTOR in bytes */
50 /** Commit any cached read/writes to disk */
52 /** Initialize the disk. This IOCTL must be issued before the disk can be
54 * invocation of this macro on an uninitialized disk will initialize the IO
58 /** Deinitialize the disk. This IOCTL can be used to de-initialize the disk,
59 * enabling it to be removed from the system if the disk is hot-pluggable.
60 * Disk usage is reference counted, so for a given disk the
62 * `DISK_IOCTL_CTRL_INIT` IOCTL was issued in order to de-initialize it.
65 * which if true indicates the disk should be forcibly stopped, ignoring all
66 * reference counts. The disk driver must report success if a forced stop is
75 /** Disk status okay */
77 /** Disk status uninitialized */
79 /** Disk status no media */
81 /** Disk status write protected */
87 * @brief Disk info
92 /** Disk name */
93 const char *name; member
94 /** Disk operations */
96 /** Device associated to this disk */
98 /** Internally used disk reference count */
103 * @brief Disk operations
106 int (*init)(struct disk_info *disk);
107 int (*status)(struct disk_info *disk);
108 int (*read)(struct disk_info *disk, uint8_t *data_buf,
110 int (*write)(struct disk_info *disk, const uint8_t *data_buf,
112 int (*ioctl)(struct disk_info *disk, uint8_t cmd, void *buff);
116 * @brief Register disk
118 * @param[in] disk Pointer to the disk info structure
122 int disk_access_register(struct disk_info *disk);
125 * @brief Unregister disk
127 * @param[in] disk Pointer to the disk info structure
131 int disk_access_unregister(struct disk_info *disk);