A block device. More...
#include <device.h>

Data Fields | |
| uint32_t | nr_blocks |
| uint16_t | block_size |
| uint8_t | flags |
| void(* | prepare_req )(struct block_device *bdev, struct block_request *req, block_addr_t lba, block_len_t nr_blocks, enum block_operation operation) |
| struct block_request *(* | alloc_req )(struct block_device *bdev) |
| void(* | free_req )(struct block_device *bdev, struct block_request *req) |
| uint32_t(* | get_dev_id )(struct block_device *bdev) |
A block device.
A block device can handle block-oriented requests like read and write. Each request operates on one or more blocks.
Definition at line 138 of file device.h.
struct block_request*(* block_device::alloc_req)(struct block_device *bdev) [read] |
For internal use only.
Definition at line 153 of file device.h.
Referenced by block_alloc_request().
For internal use only.
Definition at line 143 of file device.h.
Referenced by blkdev_get_block_size(), and blkdev_set_block_size().
Flags indicating the state of the device
Definition at line 146 of file device.h.
Referenced by dataflash_detect().
| void(* block_device::free_req)(struct block_device *bdev, struct block_request *req) |
| uint32_t(* block_device::get_dev_id)(struct block_device *bdev) |
The total number of blocks the device can hold
Definition at line 140 of file device.h.
Referenced by dataflash_detect().
| void(* block_device::prepare_req)(struct block_device *bdev, struct block_request *req, block_addr_t lba, block_len_t nr_blocks, enum block_operation operation) |
1.6.3